Skip to content

Better detection of when window.crypto.subtle works (detection of secure context) #159

@jonasfj

Description

@jonasfj

The webcrypto API is only available in "secure contexts". We should detect when this isn't the case, make sure we throw UnsupportedError with a description error message, and ideally a link to some documentation about "secure contexts".

We could potentially write up a note about this in the "compatibility notes" section in the README.md.


Also it'd be nice if we had some test cases for this. Those might have to be manual test cases, because dart test running in the browser will probably fake a secure context.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions