mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-14 02:59:30 +00:00
Merge pull request #391 from zitadel/fix-saml
fix(saml): requestId serializing
This commit is contained in:
@@ -81,9 +81,12 @@ export async function GET(request: NextRequest) {
|
||||
|
||||
// internal request id which combines authRequest and samlRequest with the prefix oidc_ or saml_
|
||||
let requestId =
|
||||
searchParams.get("requestId") ||
|
||||
`oidc_${oidcRequestId}` ||
|
||||
`saml_${samlRequestId}`;
|
||||
searchParams.get("requestId") ??
|
||||
(oidcRequestId
|
||||
? `oidc_${oidcRequestId}`
|
||||
: samlRequestId
|
||||
? `saml_${samlRequestId}`
|
||||
: undefined);
|
||||
|
||||
const sessionId = searchParams.get("sessionId");
|
||||
|
||||
@@ -470,9 +473,10 @@ export async function GET(request: NextRequest) {
|
||||
if (url && binding.case === "redirect") {
|
||||
return NextResponse.redirect(url);
|
||||
} else if (url && binding.case === "post") {
|
||||
// Create form data after SAML standard
|
||||
const formData = {
|
||||
key1: "value1",
|
||||
key2: "value2",
|
||||
RelayState: binding.value.relayState,
|
||||
SAMLResponse: binding.value.samlResponse,
|
||||
};
|
||||
|
||||
// Convert form data to URL-encoded string
|
||||
|
Reference in New Issue
Block a user