Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jonasfj opened this issue Oct 11, 2024 · 0 comments

Comments

@jonasfj
Copy link
Member

jonasfj commented Oct 11, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant