Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit a2ff595

Browse files
committed
Store username in windows credential.
When using SSO.
1 parent ee3341f commit a2ff595

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/GitHub.Api/LoginManager.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,9 @@ public async Task<User> LoginViaOAuth(
135135
var token = await oauthClient.CreateAccessToken(request);
136136

137137
await keychain.Save("[oauth]", token.AccessToken, hostAddress).ConfigureAwait(false);
138-
return await ReadUserWithRetry(client);
138+
var user = await ReadUserWithRetry(client);
139+
await keychain.Save(user.Login, token.AccessToken, hostAddress).ConfigureAwait(false);
140+
return user;
139141
}
140142

141143
/// <inheritdoc/>

0 commit comments

Comments
 (0)