Skip to content

Commit 4ef85f7

Browse files
committed
generate random state parameter in oauth state machine
1 parent 1c8bf36 commit 4ef85f7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

client/src/lib/oauth-state-machine.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,8 @@ export const oauthTransitions: Record<OAuthStep, StateTransition> = {
117117
const array = new Uint8Array(32);
118118
crypto.getRandomValues(array);
119119
const state = Array.from(array, (byte) =>
120-
byte.toString(16).padStart(2, '0'),
121-
).join('');
120+
byte.toString(16).padStart(2, "0"),
121+
).join("");
122122

123123
const { authorizationUrl, codeVerifier } = await startAuthorization(
124124
context.serverUrl,

0 commit comments

Comments
 (0)