Skip to content

Commit

Permalink
chore: import createHash only
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmedrangel committed Feb 23, 2025
1 parent 479eab0 commit 77855d3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/runtime/server/lib/oauth/kick.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import crypto from 'node:crypto'
import { createHash } from 'node:crypto'
import type { H3Event } from 'h3'
import { eventHandler, getQuery, sendRedirect } from 'h3'
import { withQuery } from 'ufo'
Expand Down Expand Up @@ -78,7 +78,7 @@ export function defineOAuthKickEventHandler({ config, onSuccess, onError }: OAut
redirect_uri: redirectURL,
scope: config.scope.join(' '),
state: randomUUID(),
code_challenge: crypto.createHash('sha256').update(codeVerifier).digest('base64url'),
code_challenge: createHash('sha256').update(codeVerifier).digest('base64url'),
code_challenge_method: 'S256',
}),
)
Expand Down

0 comments on commit 77855d3

Please sign in to comment.