Cognito Federated user logout

0

For cognito user - Using Amplify I was able to login using

await Auth.signIn(this.email, this.password);

And logout using:

Auth.signOut();

For federated user - Using Amplify I was able to login using

await Auth.federatedSignIn({ customProvider: 'customProviderName' });

But logout doesnt support using:

Auth.signOut();

How can I signout federated user, so that when I try to login again, it ask my permission to login ?

1 Antwort
0

According to the documentation (here), you need to either redirect the user to the Cognito endpoint: GET https://mydomain.auth.us-east-1.amazoncognito.com/logout or perform the GET yourself and then redirect to the correct sign-in location. The former is going to be easier.

AWS
beantwortet vor 2 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen