mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-23 07:17:38 +00:00
fix: saml attributes for form post
This commit is contained in:
@@ -477,17 +477,17 @@ export async function GET(request: NextRequest) {
|
|||||||
} else if (url && binding.case === "post") {
|
} else if (url && binding.case === "post") {
|
||||||
// Create form data after SAML standard
|
// Create form data after SAML standard
|
||||||
const formData = {
|
const formData = {
|
||||||
"RelayState": binding.value.relayState,
|
RelayState: binding.value.relayState,
|
||||||
"SAMLResponse": binding.value.samlResponse,
|
SAMLResponse: binding.value.samlResponse,
|
||||||
};
|
};
|
||||||
|
|
||||||
// Convert form data to URL-encoded string
|
// Convert form data to URL-encoded string
|
||||||
const formBody = Object.entries(formData)
|
const formBody = Object.entries(formData)
|
||||||
.map(
|
.map(
|
||||||
([key, value]) =>
|
([key, value]) =>
|
||||||
encodeURIComponent(key) + "=" + encodeURIComponent(value),
|
encodeURIComponent(key) + "=" + encodeURIComponent(value),
|
||||||
)
|
)
|
||||||
.join("&");
|
.join("&");
|
||||||
|
|
||||||
// Make a POST request to the external URL with the form data
|
// Make a POST request to the external URL with the form data
|
||||||
const response = await fetch(url, {
|
const response = await fetch(url, {
|
||||||
|
Reference in New Issue
Block a user