File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,10 +9,11 @@ const DEFAULT_SCOPES = ["repo", "workflow"];
99 * @returns A {@link vscode.AuthenticationSession}
1010 */
1111export async function getSession ( forceMessage ?: string ) : Promise < vscode . AuthenticationSession > {
12- const existingSession = await vscode . authentication . getSession ( AUTH_PROVIDER_ID , getScopes ( ) , {
13- createIfNone : true ,
14- forceNewSession : forceMessage ? { detail : forceMessage } : false
15- } ) ;
12+ // forceNewSession and createIfNone are mutually exclusive
13+ const options : vscode . AuthenticationGetSessionOptions = forceMessage
14+ ? { forceNewSession : { detail : forceMessage } }
15+ : { createIfNone : true } ;
16+ const existingSession = await vscode . authentication . getSession ( AUTH_PROVIDER_ID , getScopes ( ) , options ) ;
1617
1718 if ( ! existingSession ) {
1819 throw new Error ( "Could not get token from the GitHub authentication provider. \nPlease sign-in and allow access." ) ;
You can’t perform that action at this time.
0 commit comments