-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Change GK account authentication to no longer use the VS Code authentication system #3524
Conversation
hi @eamodio If I understand the task correctly it looks like we should:
We already save sessions to the secret storage, so probably nothing new should appear that would be related to the session management. Is this understanding correct in general? |
Hi @eamodio Here is updated version of the question above: #1 - I've stop registering So, now everything works as expected. The rest question is #2: should I stop implementing And one more question will be in a comment related to the code: #3524 (comment) |
scopes: string[], | ||
createIfNeeded: boolean, | ||
): Promise<AuthenticationSession | undefined> { | ||
const session = (await this.getSessions(scopes))[0]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure that this is the right way of accessing the session: retrieving an array of matching sessions and taking the first one. Can you confirm or suggest a better way?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I've created a follow up ticket: #3574 |
Currently we leverage the VS Code authentication system for our GK authentication, but this causes unnecessary prompts and limits our control over the experience.
We already implement both sides of the authentication process within GitLens, so we just need to avoid using VS Code as the middleman
Roadmap
createIfNeeded
andsilent
flags.probably stop implementing AuthenticationProvider➡️ probably but in a follow-upstop relying on authentication events, e.g. stop handling them and make sure that we loos nothing by doing that (or fix the cases that are broken)I've checked that don't relying on such events for GK authentication.Testing notes