Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
Timothy Wang committed Aug 7, 2024
1 parent d32027f commit 5feccd6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/core/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ export const CUSTOM_AUTH_TOKEN_ENDPOINT_MAPPING: AuthIdentityTokenEndpoints = {
path: "/login/oauth/access_token",
},
aad: {
host: "login.microsoft.com",
path: "/tenantId/oauth/v2.0/token",
host: "login.microsoftonline.com",
path: "/tenantId/oauth2/v2.0/token",
},
};
export const CUSTOM_AUTH_USER_ENDPOINT_MAPPING: AuthIdentityTokenEndpoints = {
Expand Down
4 changes: 2 additions & 2 deletions src/msha/auth/routes/auth-login-provider-callback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ const getOAuthToken = function (authProvider: string, codeValue: string, clientI
code: codeValue,
client_id: clientId,
client_secret: clientSecret,
...(authProvider !== "github" && { grant_type: authProvider }),
...(authProvider !== "github" && { redirect_uri: `${redirectUri}/.auth/login/${authProvider}/callback` }),
grant_type: "authorization_code",
redirect_uri: `${redirectUri}/.auth/login/${authProvider}/callback`,
});

let tokenPath = CUSTOM_AUTH_TOKEN_ENDPOINT_MAPPING?.[authProvider]?.path;
Expand Down
2 changes: 1 addition & 1 deletion src/msha/auth/routes/auth-login-provider-custom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ const httpTrigger = async function (context: Context, request: IncomingMessage,
location = `https://github.com/login/oauth/authorize?response_type=code&client_id=${clientId}&redirect_uri=${redirectUri}/.auth/login/github/callback&scope=read:user&state=${hashedState}`;
break;
case "aad":
location = `${aadIssuer}/authorize?response_type=code&client_id=${clientId}&redirect_uri=${redirectUri}/.auth/login/aad/callback&scope=openid&state=${hashedState}`;
location = `${aadIssuer}/authorize?response_type=code&client_id=${clientId}&redirect_uri=${redirectUri}/.auth/login/aad/callback&scope=openid+profile+email&state=${hashedState}`;
break;
default:
break;
Expand Down

0 comments on commit 5feccd6

Please sign in to comment.