You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 12, 2020. It is now read-only.
Importing this library using import { CognitoAuth } from 'amazon-cognito-auth-js/dist/amazon-cognito-auth'; to grab the prebuilt Webpack distribution, as recommended by issue #13 .
Cognito is set up to use a 3rd party federated ID provider internal to my company. We're using the code grant flow.
Some authentication step after returning with the grant code is calling a function named decode, I believe defined in DecodingHelper.js. That code calls global.atob(). which throws the following error at line 730 of the Webpacked file: ERROR TypeError: "global is undefined"
It appears to be preventing the library from writing the credentials to localStorage.
I was able to fix this issue by changing the definition of decode() in the Webpack file to
Technologies used: Angular 8.1.3, Firefox 68.1.0esr
Importing this library using
import { CognitoAuth } from 'amazon-cognito-auth-js/dist/amazon-cognito-auth';
to grab the prebuilt Webpack distribution, as recommended by issue #13 .Cognito is set up to use a 3rd party federated ID provider internal to my company. We're using the code grant flow.
Some authentication step after returning with the grant code is calling a function named decode, I believe defined in DecodingHelper.js. That code calls
global.atob()
. which throws the following error at line 730 of the Webpacked file:ERROR TypeError: "global is undefined"
It appears to be preventing the library from writing the credentials to localStorage.
I was able to fix this issue by changing the definition of
decode()
in the Webpack file tobut this is not an ideal way to fix this bug.
The text was updated successfully, but these errors were encountered: