Repository navigation
Dot com sign in - #639
Dot com sign in#639
Conversation
Otherwise we prevent the submit, which is the whole point of having a type in the first place.
|
@joshaber I assume you also intend to support token auth, right? |
If I understand you right, that's what we're doing here. We use basic auth to create an authorization using https://developer.github.com/v3/oauth_authorizations/#create-a-new-authorization. Then we use the created token going forward. I said "basic auth" in the body to distinguish it from the OAuth web flow, which we also support. |
|
@joshaber awesome. Apologies for not looking too closely at the diff & what you're building on, "Basic Auth" threw me off. I'm mainly thinking about how Orgs SAML SSO flow will work here (RE: https://github.com/github/identity/issues/122#user-content-api-git). https://github.com/github/platform-iam/pull/50 obviously has these concerns raised from the client application perspective already. ❤️ |
|
No worries, I appreciate you thinking of us! |
|
🍊 |
| /** The note used for created authorizations. */ | ||
| function getNote(): string { | ||
| return `GitHub Desktop on ${OS.hostname()}` | ||
| function getNote(login: string): string { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
🛣 |
|
Why are we not persisting the fingerprint any more? Wouldn't it make a lot of sense to persist it on a per machine level? |
|
The fingerprint doesn't seem to serve a purpose anymore, besides uniquely identifying authorization requests. Since you can no longer fetch a token based on its fingerprint, there's no reason to save it. |
I thought a new token with the same fingerprint would automatically revoke any previous token with that fingerprint. Such that signing in twice with the same fingerprint would automatically revoke any previous tokens created on that particular user/machine combination. Is that no longer the case or has it never been the case outside of my head? |
That wasn't the case in testing. I'd get a 422 if I tried to create a new authorization with an existing fingerprint. From a naive look at the code (here and here) it looks like it's just a uniqueness constraint. |
Huh, I could have sworn that was the case when we did this for GHfW. Guess I was wrong. |
|
At one point we used the get-or-create endpoint to re-use an existing authorization if possible. But now that you cannot get a full token back from there, we have to unconditionally create a new authorization. At least that was the progression of things on the Mac side. |
Sign in via basic auth.
Fixes the dot com side of #56.