GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Support SAML HTTP-POST binding for federated login by Kolpa · Pull Request #8 · XcodesOrg/XcodesLoginKit

Conversation

@Kolpa

@Kolpa Kolpa commented Oct 13, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Summary

  • Detect a SAML HTTP-POST binding in FederationResponse.idpURL (httpMethod == "POST" + a SAMLRequest param) and rewrite it to the SAML HTTP-Redirect (GET) binding, which the identity provider also accepts.
  • Re-encode the SAMLRequest from base64(uncompressed XML) to base64(raw-DEFLATE(XML)) and form-urlencode the whole query so base64 characters (+ / =) survive as %2B %2F %3D.
  • Add usesPostBinding and isSAMLRequest computed properties on FederationResponse to make the branching explicit and testable.
  • Add regression coverage for the conversion, the encoding, and the pass-through cases.

Context

idpURL always built a GET-style URL and appended requestParams as query items. For orgs whose IdP expects the SAML request via an HTTP form POST (i.e. Microsoft Entra) the resulting URL is malformed and the IdP rejects it with AADSTS750056: SAMLRequest message was not properly base64-encoded, so federated sign-in never completes.

This Pr is a initial draft on the Solution 2 from #4, we rebuild a compliant GET request from the existing POST based parameters if, and only if, the SAMLRequest parameter is present. This is to ensure that we do not break other non SAML-based auth flows that do not require a reencode.

I also added a custom form-urlencode based encoding step for the url parameters as this is the expected coding scheme for SAML GET url parameters (for some reason) and decoding of some typically url allowed characters (i.e. +) break on ms entra side. For normal requests it should not matter, url encoding these characters is always possible just not required.

Verification

  • Tested with a Microsoft Entra federated account, both the xcodes CLI and the Xcodes GUI worked for me when built against my fork of loginkit.

Scope / limitations

This targets the specific case from #4 the SAML HTTP-POST binding and has so far only been tested with Microsoft Entra.

It probably does not cover every httpMethod == "POST" federated scenario.

non-SAML POST flows are intentionally left as pass-through and are not converted. Other SAML IdPs that use the POST binding should work (the conversion follows the standard redirect binding) but haven't been verified. Feedback from users on other identity providers would be welcome.

Closes #4

Related: XcodesOrg/XcodesApp#857

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@Kolpa
Add SAML POST-to-GET binding conversion for federated IdP URL
393f5d2
@Kolpa Kolpa mentioned this pull request Oct 13, 2026
Apple-ID Authorization via federated microsoft account fails XcodesOrg/XcodesApp#857
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Federated Login for httpMethod == "POST" fails

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@Kolpa
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.