Skip to content

Commit

Permalink
lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
imarban committed Apr 4, 2024
1 parent 0d0a3d1 commit 5f73272
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion extensions/github-authentication/src/common/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export function isSupportedClient(uri: Uri): boolean {

export function isSupportedTarget(type: AuthProviderType, enterpriseSettings?: EnterpriseSettings): boolean {
return (
type === AuthProviderType.github || enterpriseSettings?.ssoId != undefined ||
type === AuthProviderType.github || enterpriseSettings?.ssoId !== undefined ||
isHostedGitHubEnterprise(enterpriseSettings?.uri!)
);
}
Expand Down
12 changes: 6 additions & 6 deletions extensions/github-authentication/src/flows.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ const allFlows: IFlow[] = [
cancellable: true
}, async (_, token) => {
const promise = uriHandler.waitForCode(logger, scopes, nonce, token);
let loginAuthorizeSearchParams = new URLSearchParams([
const loginAuthorizeSearchParams = new URLSearchParams([
['client_id', Config.gitHubClientId],
['redirect_uri', redirectUri.toString(true)],
['scope', scopes],
Expand All @@ -179,13 +179,13 @@ const allFlows: IFlow[] = [
if (existingLogin) {
loginAuthorizeSearchParams.append('login', existingLogin);
}
let loginAuthorizeUri = baseUri.with({
const loginAuthorizeUri = baseUri.with({
path: '/login/oauth/authorize',
query: loginAuthorizeSearchParams.toString()
});
let uri = loginAuthorizeUri;

if (enterpriseSettings?.ssoId != undefined) {
if (enterpriseSettings?.ssoId !== undefined) {
const searchParams = new URLSearchParams([
['return_to', encodeURIComponent(loginAuthorizeUri.toString(true))],
]);
Expand Down Expand Up @@ -340,14 +340,14 @@ const allFlows: IFlow[] = [

await env.clipboard.writeText(json.user_code);

let verificationUri = json.verification_uri
if (enterpriseSettings?.ssoId != undefined) {
let verificationUri = json.verification_uri;
if (enterpriseSettings?.ssoId !== undefined) {
verificationUri = baseUri.with({
path: `/enterprises/${enterpriseSettings.ssoId}/sso`,
query: new URLSearchParams([
['return_to', encodeURIComponent(verificationUri)],
]).toString(),
}).toString(true)
}).toString(true);
}

const uriToOpen = await env.asExternalUri(Uri.parse(verificationUri));
Expand Down

0 comments on commit 5f73272

Please sign in to comment.