Skip to content

Commit 4214416

Browse files
pomdtrthdxr
andauthored
allow oauth style autodetection (#232)
* only delete oauth code when tokens are emitted * Create stupid-boats-play.md --------- Co-authored-by: Dax <mail@thdxr.com>
1 parent 63dc1da commit 4214416

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/stupid-boats-play.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@openauthjs/openauth": patch
3+
---
4+
5+
allow auth style autodetection

packages/openauth/src/issuer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -830,7 +830,6 @@ export function issuer<
830830
400,
831831
)
832832
}
833-
await Storage.remove(storage, key)
834833
if (payload.redirectURI !== form.get("redirect_uri")) {
835834
return c.json(
836835
{
@@ -879,6 +878,7 @@ export function issuer<
879878
}
880879
}
881880
const tokens = await generateTokens(c, payload)
881+
await Storage.remove(storage, key)
882882
return c.json({
883883
access_token: tokens.access,
884884
expires_in: tokens.expiresIn,

0 commit comments

Comments
 (0)