Skip to content

Commit

Permalink
fix(@aws-amplify/auth): fix storage bug for auto sign in value (aws-a…
Browse files Browse the repository at this point in the history
…mplify#10139)

Co-authored-by: Balashova <olybalas@98dd60782ea0.ant.amazon.com>
Co-authored-by: Francisco Rodriguez <frodriguez.cs@gmail.com>
  • Loading branch information
3 people authored Aug 1, 2022
1 parent eb7a2c4 commit 06504e6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/auth/src/Auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ export class AuthClass {

autoSignIn = params.autoSignIn ?? { enabled: false };
if (autoSignIn.enabled) {
this._storage.setItem('amplify-auto-sign-in', true);
this._storage.setItem('amplify-auto-sign-in', 'true');
autoSignInValidationData = autoSignIn.validationData ?? {};
autoSignInClientMetaData = autoSignIn.clientMetaData ?? {};
}
Expand Down Expand Up @@ -462,7 +462,7 @@ export class AuthClass {
}

private handleLinkAutoSignIn(authDetails: AuthenticationDetails) {
this._storage.setItem('amplify-polling-started', true);
this._storage.setItem('amplify-polling-started', 'true');
const start = Date.now();
const autoSignInPollingIntervalId = setInterval(() => {
if (Date.now() - start > MAX_AUTOSIGNIN_POLLING_MS) {
Expand Down

0 comments on commit 06504e6

Please sign in to comment.