Skip to content

Commit

Permalink
return aud field when verifying token
Browse files Browse the repository at this point in the history
  • Loading branch information
thdxr committed Dec 15, 2024
1 parent 02aad9d commit 80238de
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/silver-teachers-brake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@openauthjs/openauth": patch
---

return aud field when verifying token
2 changes: 2 additions & 0 deletions packages/openauth/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ export function createClient(input: {
| {
err?: undefined
tokens?: Tokens
aud: string
subject: {
[type in keyof T]: {
type: type
Expand All @@ -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,
Expand Down

0 comments on commit 80238de

Please sign in to comment.