4

I have integrated Aws Congnito federated authentication with provider in react native, it is working good.

Issue is:

When i m going to logout and login again it is not asking my login account account details again, it takes directly old account and logged.

i tried these line of code while logout for session clear:

 Auth.signOut();

cognitoCredentials.clearCachedId();
cognitoCredentials = new AWS.CognitoIdentityCredentials(cognitoParams);
AWS.config.credentials = cognitoCredentials

then i used amplity Hub listen , events are triggerd good

 Hub.listen("auth", ({ payload: { event, data } }) => {
    switch (event) {
      case "signIn":
      case 'cognitoHostedUI':
        break;
       case "signOut":
          console.log('Yes Logout');
         //clear my local 
          break;
        case 'signIn_failure':
        case 'cognitoHostedUI_failure':
          console.log('Sign in failure', data);
          break;
        case "customOAuthState":
  });

i noticed this one but i can't solve my problem How to force select account when signing in with Google.

I would like to know if anything i missed , please provide any solution to me.

Angu
  • 862
  • 2
  • 13
  • 32

0 Answers0