You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A random $state is generated, and set to the localstorage
User clicks the login button. This opens https://github.com/login/oauth/authorize?client_id=...state=$state
Github then return to the application callback URL https://dev.dumbcode.net/oauth/github with a $code and a $state
If $state does not match the localstorage state, throw an error and return.
the oauth/github.html file then calls https://dev.dumbcode.net/oauth/go/github with that $code, which calls https://github.com/login/oauth/access_token with the URL params $code, $client_id and $client_secret, which returns the access token.
The access token is set to the localstorage, which the studio listens on.
New flow of logging in would be exactly the same, in stages 1-4 :
The oauth/github.html file then calls https://dev.dumbcode.net/oauth/github/login with that code, which calls https://github.com/login/oauth/access_token with the URL params $code, $client_id and $client_secret, which returns the github access token. We then sign a jwt of the github username (and other identifiable information).
The signed jwt, and the github access token is then returned to the client, which saves both of them in localstorage.
Note that we can remove the github access token part, and then log-in for ANYTHING oauth based.
However, for now, just do github, as it allows us to directly link tokens.
For example:
Github:
It's worth noting that the whole point of this is to allow for identification of the client. This opens the door to allow for certain users to have unlimited upload time on aws for stuff like #210
The text was updated successfully, but these errors were encountered:
Powered with a github account.
Current flow of logging in:
$state
is generated, and set to the localstoragehttps://github.com/login/oauth/authorize?client_id=...state=$state
https://dev.dumbcode.net/oauth/github
with a$code
and a$state
$state
does not match the localstorage state, throw an error and return.oauth/github.html
file then callshttps://dev.dumbcode.net/oauth/go/github
with that$code
, which callshttps://github.com/login/oauth/access_token
with the URL params$code
,$client_id
and$client_secret
, which returns the access token.New flow of logging in would be exactly the same, in stages 1-4 :
oauth/github.html
file then callshttps://dev.dumbcode.net/oauth/github/login
with that code, which callshttps://github.com/login/oauth/access_token
with the URL params$code
,$client_id
and$client_secret
, which returns the github access token. We then sign a jwt of the github username (and other identifiable information).Note that we can remove the github access token part, and then log-in for ANYTHING oauth based.
However, for now, just do github, as it allows us to directly link tokens.
For example:
Github:
Google:
It's worth noting that the whole point of this is to allow for identification of the client. This opens the door to allow for certain users to have unlimited upload time on aws for stuff like #210
The text was updated successfully, but these errors were encountered: