Skip to content

Commit

Permalink
Fix Lichens provider internals (#777)
Browse files Browse the repository at this point in the history
  • Loading branch information
pilcrowonpaper authored Jun 23, 2023
1 parent b39f868 commit 5e8186d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/oauth/src/providers/lichess.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const lichess = <_Auth extends Auth>(auth: _Auth, config: Config) => {
const getAuthorizationUrl = async () => {
const state = generateState();
// PKCE code verifier length and alphabet defined in RFC 7636 section 4.1
const code_verifier = generateRandomString(
const codeVerifier = generateRandomString(
96,
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-_.~"
);
Expand All @@ -29,13 +29,13 @@ export const lichess = <_Auth extends Auth>(auth: _Auth, config: Config) => {
client_id: config.clientId,
code_challenge_method: "S256",
code_challenge: pkceBase64urlEncode(
await pkceCodeChallenge(code_verifier)
await pkceCodeChallenge(codeVerifier)
),
scope: scope([], config.scope),
redirect_uri: config.redirectUri,
state
});
return [url, state, code_verifier] as const;
return [url, state, codeVerifier] as const;
};

const getLichessTokens = async (code: string, codeVerifier: string) => {
Expand Down

0 comments on commit 5e8186d

Please sign in to comment.