Skip to content

Commit 425ddba

Browse files
bytaesuBekacru
authored andcommitted
fix(oidc-provider): resolve getSignedCookie return type (#6346)
1 parent 9433e5e commit 425ddba

File tree

1 file changed

+4
-1
lines changed
  • packages/better-auth/src/plugins/oidc-provider

1 file changed

+4
-1
lines changed

packages/better-auth/src/plugins/oidc-provider/index.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,10 +408,13 @@ export const oidcProvider = (options: OIDCOptions) => {
408408

409409
if (!consentCode) {
410410
// Check for cookie-based consent flow
411-
consentCode = await ctx.getSignedCookie(
411+
const cookieValue = await ctx.getSignedCookie(
412412
"oidc_consent_prompt",
413413
ctx.context.secret,
414414
);
415+
if (cookieValue) {
416+
consentCode = cookieValue;
417+
}
415418
}
416419

417420
if (!consentCode) {

0 commit comments

Comments
 (0)