Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Oct 16, 2019. It is now read-only.

Conversation

atmos
Copy link
Owner

@atmos atmos commented Feb 13, 2015

This uses an internal API that we're evaluating to give people easier single sign out for OAuth clients using cookie sessions. This is only available to GitHub owned OAuth apps, and shouldn't have any adverse effects for everyone else's clients.

Here's how it works:

  • During the OAuth callback phase an extra parameter is returned to the handshake, browser_session_id. This is stored on the user object for later use.
  • GitHub has an API available /user/sessions/active that accepts OAuth tokens and the browser_session_id. Given these two values GitHub can determine if the initiating browser still has a valid session and returns true or false depending on whether it's still valid on the site.
  • Browser sessions can be verified periodically in a before filter to ensure that the user should still have access to the site. By default the check ensures that the user has been verified in the last 2 minutes.

I'm gonna fix up the example app and start rolling this out to a few apps before merging and releasing.

@btoews
Copy link
Contributor

btoews commented Feb 13, 2015

Lookin' good

@atmos
Copy link
Owner Author

atmos commented Feb 18, 2015

/cc @benbalter

atmos added a commit that referenced this pull request Feb 18, 2015
Add basic single sign out support for GitHub properties
@atmos atmos merged commit 3e9aa5f into master Feb 18, 2015
@atmos atmos deleted the single-sign-out branch February 18, 2015 22:12
atmos added a commit to atmos/sinatra_auth_github that referenced this pull request Feb 18, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants