mirror of
https://github.com/estruyf/vscode-front-matter.git
synced 2026-08-12 03:43:01 +02:00
#691 - Silent authentication retrieval for GitHub sponsors
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
### 🐞 Fixes
|
||||
|
||||
- [#685](https://github.com/estruyf/vscode-front-matter/issues/685): Fix when using non-string values in the tag picker
|
||||
- [#691](https://github.com/estruyf/vscode-front-matter/issues/691): Silent authentication retrieval for GitHub sponsors
|
||||
|
||||
## [9.3.0] - 2023-10-06 - [Release notes](https://beta.frontmatter.codes/updates/v9.3.0)
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ export class Credentials {
|
||||
* prompting the user to sign in.
|
||||
* */
|
||||
const session = await authentication.getSession(GITHUB_AUTH_PROVIDER_ID, SCOPES, {
|
||||
createIfNone: false
|
||||
silent: true
|
||||
});
|
||||
|
||||
if (session) {
|
||||
@@ -62,8 +62,13 @@ export class Credentials {
|
||||
* Note that this can throw if the user clicks cancel.
|
||||
*/
|
||||
const session = await authentication.getSession(GITHUB_AUTH_PROVIDER_ID, SCOPES, {
|
||||
createIfNone: true
|
||||
silent: true
|
||||
});
|
||||
|
||||
if (!session) {
|
||||
throw new Error('No GitHub authentication session available.');
|
||||
}
|
||||
|
||||
this.octokit = new Octokit.Octokit({
|
||||
auth: session.accessToken
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user