- How do I troubleshoot possible CORS issues in AM?
- Why can I get a session token, but not an access token?
- Why do I get an error similar to "a mutation operation was attempted on a database that did not allow mutations"?
- How do I enable Firefox and Safari to collect location data on Mac OS?
- Why do I get an error similar to "Cannot read property 'digest' of undefined"?
See How do I troubleshoot issues with the CORS filter in AM (All versions)? on troubleshooting CORS issues in AM.
- Confirm that there are no errors in the browser console.
- Confirm that calls to the /authenticate endpoint from your app are returning either 200 or 401.
- If 405 is returned, ensure your CORS configuration in AM allows your host and HTTP methods.
Confirm that calls to the /authenticate endpoint from your app are returning 302 and that the location header contains a URL which includes a code query parameter.
- If 400 is returned, check the HTML response body for a script block defining a pageData variable that describes the error.
- If 200 is returned, check the following:
- Ensure that the "Implied consent" property is enabled in the OAuth 2.0 client profile in AM. Without the property, AM returns a page to ask the user to provide consent for the requested scopes, which the SDK is not expecting.
- If using Chrome 80 or newer, the SameSite=Lax option is possibly being applied, and the session cookie is not being written even though authentication is successful. Without the cookie, AM keeps redirecting to the login page.
Why do I get an error similar to "a mutation operation was attempted on a database that did not allow mutations"?
For more information, see IndexedDB does not function in private browsing mode.
To allow Firefox and Safari to collect location data on Mac OS:
- In Mac OS, open System Preferences, and then click Security & Privacy.
- On the Privacy tab, select Location Services.
- If required, click the lock icon to allow changes to the settings to be made, and enter your password.
- If required, click the lock icon again to prevent further changes to the settings.
If you are using a Chromium-based browser (including Google Chrome, Microsoft Edge, Opera and Amazon Silk), this error message can occur if you are not accessing the SDK application by using a "secure origin", for example you are using HTTP rather than HTTPS.
For testing purposes, you can use localhost, which Chromium-based browsers consider to be a secure origin. Be sure to configure your CORS filters accordingly.
For more information, see WebCrypto.