question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Sign Out Federated(google) users

See original GitHub issue

** Which Category is your question related to? ** AWS Amplify ** What AWS Services are you utilizing? ** Cognito ** Provide additional details e.g. code snippets **

Hello,

I am using AWS amplify to SignUp and SignIn my user pool users and federated users in the pool,

For Cognito User pool user’s I use,

Auth.signIn(this.username, this.password)

and for federated(Google) users to log in to the pool, I use,

Auth.federatedSignIn() method.

Now the issue is on SignOut.

When I do

Auth.signOut()

it only signOut users who had signIn with Auth.signIn(this.username, this.password) method.

it doesnt SignOut federated users.

Please help.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:7
  • Comments:29 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Reenagrg100commented, Sep 3, 2020

@Reenagrg100 the trick is using this property:

ephemeralWebSession (Boolean) | Prevent re-use cookies of previous session (openAuth only) [true/false]

It will not store cookies from Amplify, so whenever the federated UI is presented, it will be a fresh page. The library I shared with you is using Safari as a modal (when using the openAuth method). It’s the required method by Apple for them to approve your iOS app. I’m not sure if there is another library out there that can handle this feature, but you will need to further investigate in that case on your own, sorry.

Thank you so much, @cristhian-boc !! I know about this library to open the in-app browser. The same behaviour is achieved by react-native safari view library. Well I’ll look into it how can I achieve same in my case.

1reaction
jonasaocommented, Jan 10, 2019

@csepulv the local storage is cleared automatically on signout call.

Sorry, but this is not working as expected. Local storage is not cleared automatically when calling Auth.signout().

Read more comments on GitHub >

github_iconTop Results From Across the Web

Log Users Out of Identity Providers - Auth0
Some providers allow you to force a user to log out of their identity provider . Auth0 often accomplishes this by adding the...
Read more >
Best practices for federating Google Cloud with an external ...
This document presents best practices and guidance that help you set up federation consistently and securely. The guidance builds on the best practices...
Read more >
Identity Server 4 - federated logout of google when used as an ...
Background Information: When a user is signing-out of IdentityServer, and they have used an external identity provider to sign-in then it is ...
Read more >
Sign a user out of a managed Google Account
Sign a user out from computers & smart home devices · Sign in to your Google Admin console. Sign in using your administrator...
Read more >
Use federated authentication with Google Workspace in Apple ...
Sign out of Apple Business Manager. Note: Users can't sign in to iCloud.com unless they first sign in with their Managed Apple ID...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found