Skip to content
This repository has been archived by the owner on Jun 14, 2022. It is now read-only.

Commit

Permalink
fix: allow for state null/undefined ambiguity
Browse files Browse the repository at this point in the history
  • Loading branch information
noramass committed May 7, 2021
1 parent 32e1c73 commit 4a01518
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/openid/connect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export async function receive(config: OpenIdConfig, current = currentHref()): Pr
if (url.origin !== target.origin) return false;
if (url.pathname !== target.pathname) return false;
const params = url.searchParams;
if (params.get("state") !== state) return false;
if ((params.get("state") ?? undefined) !== state) return false;
const code = params.get("code");
return code ? code : false;
}

0 comments on commit 4a01518

Please sign in to comment.