Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logging out SFSafariViewController #29

Closed
kentcb opened this issue May 4, 2017 · 1 comment
Closed

Logging out SFSafariViewController #29

kentcb opened this issue May 4, 2017 · 1 comment

Comments

@kentcb
Copy link
Contributor

kentcb commented May 4, 2017

I have auth against a custom back-end working with SFSafariViewController, but I can't find any means via which I sign the user out. Calling ResetData against my OAuthApi and then calling Authenticate simply opens the browser, finds the existing cookie, and immediately logs the user back in.

I understand I need to send the user to the logout endpoint for my OAuth backend. But it looks like there is no support for this in SimpleAuth. Can you please confirm?

@Clancey
Copy link
Owner

Clancey commented May 4, 2017

You are partially correct, your auth endpoint is automatically redirecting and handing out the token. So you would want to add a Logout method on the API, that would call the Invalidate token call to your server. Then you would call ResetData.

Or you could handle this the way google does. When you receive a login request, and you are already logged in, show them an account picker/logout screen. If they choose the account already logged in, redirect to the right URL with the token. Else log them out. I prefer this method as it prevents people from having to keep logging in.

@Clancey Clancey closed this as completed May 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants