We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7e2c2d4 commit b420d36Copy full SHA for b420d36
packages/core/src/lib/actions/callback/index.ts
@@ -56,8 +56,15 @@ export async function callback(
56
57
try {
58
if (provider.type === "oauth" || provider.type === "oidc") {
59
+ // Use body if the response mode is set to form_post. For all other cases, use query
60
+ const payload =
61
+ provider.authorization?.url.searchParams.get("response_mode") ===
62
+ "form_post"
63
+ ? body
64
+ : query
65
+
66
const { proxyRedirect, randomState } = handleState(
- query,
67
+ payload,
68
provider,
69
options.isOnRedirectProxy
70
)
@@ -68,7 +75,7 @@ export async function callback(
75
}
76
77
const authorizationResult = await handleOAuth(
71
78
72
79
request.cookies,
73
80
options,
74
81
randomState
0 commit comments