Skip to content

How to handle when user cancels the pop up for federated Sign In #9948

Open
@MuhammadAbdullah54321

Description

@MuhammadAbdullah54321

I am developing app in React Native

When a user clicks on the button to sign in with google, a pop up appears but I don't see an option to handle the situation if user clicks on cancel on the top of pop up(in iOS). It do not trigger any event in the Hub listener

Provide code snippets (if applicable)
WhatsApp Image 2021-11-06 at 7 25 12 PM

here is how I am using Hub.listen()

useEffect(() => {
    Hub.listen('auth', ({ payload: { event, data } }) => {
      switch (event) {
        case 'signIn':
          getUser().then(userData => ProcessUserData(userData));
        case 'cognitoHostedUI':
          console.log("Hosted UI")
          break;
        case 'signOut':
          console.log("Signed Out Successfully");
          break;
        case 'signIn_failure':
          console.log("Cancelled")
        case 'cognitoHostedUI_failure':
          console.log('Hostedn UI failure', data);
          break;
      }
    });

  }, []);

non of the case is triggered when user presses Cancel in the UI as marked in image attached

Metadata

Metadata

Assignees

Labels

AuthRelated to Auth components/categoryCognitoRelated to cognito issuesVPVersion parity issues between v5 and v6feature-requestRequest a new feature

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions