generate random state parameter in oauth state machine
This commit is contained in:
parent
1c8bf36ea2
commit
4ef85f744c
1 changed files with 2 additions and 2 deletions
|
|
@ -117,8 +117,8 @@ export const oauthTransitions: Record<OAuthStep, StateTransition> = {
|
|||
const array = new Uint8Array(32);
|
||||
crypto.getRandomValues(array);
|
||||
const state = Array.from(array, (byte) =>
|
||||
byte.toString(16).padStart(2, '0'),
|
||||
).join('');
|
||||
byte.toString(16).padStart(2, "0"),
|
||||
).join("");
|
||||
|
||||
const { authorizationUrl, codeVerifier } = await startAuthorization(
|
||||
context.serverUrl,
|
||||
|
|
|
|||
Loading…
Reference in a new issue