How to Fix SubtleCrypto: digest() undefined Error in Authgear SDK
Guide on how to fix SubtleCrypto: digest() non-HTTPS/Secure context Error in Authgear SDK
The Authgear SDK uses a browser API SubtleCrypto: digest() which requires HTTPS. As a result, if your client application that uses the SDK is on HTTP (non-secure), you may run into the SubtleCrypto: digest() non-HTTPS/secure context error.
To use the SDK, your client application must be on HTTPS or be running in secure contexts. Secure contexts include running your application from localhost
or 127.0.0.1
.
The following are examples of the error messages you will get SubtleCrypto: digest() non-HTTPS/secure context error in Chrome and Firefox.
Chrome
Firefox
Fix
The following are ways to fix the SubtleCrypto: digest() non-HTTPS/secure context error:
If you need to run your application on a local environment or for testing where you can't set up HTTPS, consider running your application in secure contexts, For example, http://localhost or http://127.0.0.1.
To run your application from another domain other than a localhost, set up HTTPS on the domain.
You can learn more about SubtleCrypto: digest()
and Secure Contexts see the pages linked below:
Last updated