Skip to content

Commit

Permalink
Pass request to the strategy verify callback (#28)
Browse files Browse the repository at this point in the history
* Pass request to the strategy verify callback

* Update issuer.ts

* Update issuer.test.ts
  • Loading branch information
sergiodxa authored Aug 10, 2023
1 parent 7036d5a commit a9ff37d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/issuer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ const MetadataSchema = z
.optional(),
subject_types_supported: z.enum(["public"]).array().optional(),
id_token_signing_alg_values_supported: z
.enum(["HS256", "RS256"])
.enum(["HS256", "RS256", "PS256"])
.array()
.optional(),
claims_supported: z
Expand Down
2 changes: 2 additions & 0 deletions src/remix.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import { TokenSet } from "./token-set";

interface OIDCStrategyVerifyOptions {
context?: AppLoadContext;
request: Request;
profile: UserInfo;
tokens: TokenSet;
issuer: Issuer;
Expand Down Expand Up @@ -115,6 +116,7 @@ export class OIDCStrategy<User> extends Strategy<
let profile = await client.userinfo(tokens.access_token);

let user = await this.verify({
request,
profile,
tokens,
context: options.context,
Expand Down
2 changes: 1 addition & 1 deletion tests/issuer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ describe(Issuer.name, () => {
],
code_challenge_methods_supported: ["S256", "plain"],
subject_types_supported: ["public"],
id_token_signing_alg_values_supported: ["HS256", "RS256"],
id_token_signing_alg_values_supported: ["HS256", "RS256", "PS256"],
claims_supported: [
"aud",
"auth_time",
Expand Down

0 comments on commit a9ff37d

Please sign in to comment.