diff --git a/.changeset/silver-teachers-brake.md b/.changeset/silver-teachers-brake.md new file mode 100644 index 0000000..c7e0c7c --- /dev/null +++ b/.changeset/silver-teachers-brake.md @@ -0,0 +1,5 @@ +--- +"@openauthjs/openauth": patch +--- + +return aud field when verifying token diff --git a/packages/openauth/src/client.ts b/packages/openauth/src/client.ts index 47b12b9..fc27bb9 100644 --- a/packages/openauth/src/client.ts +++ b/packages/openauth/src/client.ts @@ -223,6 +223,7 @@ export function createClient(input: { | { err?: undefined tokens?: Tokens + aud: string subject: { [type in keyof T]: { type: type @@ -248,6 +249,7 @@ export function createClient(input: { ].validate(result.payload.properties) if (!validated.issues && result.payload.mode === "access") return { + aud: result.payload.aud as string, subject: { type: result.payload.type, properties: validated.value,