diff --git a/packages/openauth/src/issuer.ts b/packages/openauth/src/issuer.ts index 6646ecc6..f0e4d446 100644 --- a/packages/openauth/src/issuer.ts +++ b/packages/openauth/src/issuer.ts @@ -931,6 +931,7 @@ export function issuer< await Storage.remove(storage, key) return c.json({ access_token: tokens.access, + token_type: "Bearer", expires_in: tokens.expiresIn, refresh_token: tokens.refresh, }) @@ -1036,6 +1037,7 @@ export function issuer< }) return c.json({ access_token: tokens.access, + token_type: "Bearer", refresh_token: tokens.refresh, expires_in: tokens.expiresIn, }) diff --git a/packages/openauth/test/issuer.test.ts b/packages/openauth/test/issuer.test.ts index af1f6c94..aae7cef1 100644 --- a/packages/openauth/test/issuer.test.ts +++ b/packages/openauth/test/issuer.test.ts @@ -354,6 +354,7 @@ describe("refresh token", () => { const refreshed = await response.json() expect(refreshed).toStrictEqual({ access_token: expectNonEmptyString, + token_type: "Bearer", refresh_token: expectNonEmptyString, expires_in: expect.any(Number), }) @@ -383,6 +384,7 @@ describe("refresh token", () => { expect(refreshed).toStrictEqual({ access_token: expectNonEmptyString, refresh_token: expectNonEmptyString, + token_type: "Bearer", expires_in: expect.any(Number), })