Skip to content

Commit

Permalink
Updated misconfigured dispatch (#10511)
Browse files Browse the repository at this point in the history
Co-authored-by: Aaron S <94858815+stocaaro@users.noreply.github.com>
Co-authored-by: Chris Bonifacio <christopher.bonifacio@gmail.com>
Co-authored-by: Francisco Rodriguez <frodriguez.cs@gmail.com>
Co-authored-by: Dustin Noyes <dustin.noyes.dev@gmail.com>
  • Loading branch information
5 people authored Dec 15, 2022
1 parent 54a122c commit fb85783
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/auth/src/Auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ export class AuthClass {
Hub.listen('auth', ({ payload }) => {
const { event } = payload;
switch (event) {
case 'verify':
case 'signIn':
this._storage.setItem('amplify-signin-with-hostedUI', 'false');
break;
Expand Down Expand Up @@ -1138,10 +1139,11 @@ export class AuthClass {
return;
},
onSuccess: data => {
dispatchAuthEvent('signIn', user, `A user ${user.getUsername()} has been signed in`);
dispatchAuthEvent(
'signIn',
'verify',
user,
`A user ${user.getUsername()} has been signed in`
`A user ${user.getUsername()} has been verified`
);
logger.debug('verifyTotpToken success', data);
res(data);
Expand Down

0 comments on commit fb85783

Please sign in to comment.