Skip to content

Double POST with SAML on Chromium-based browsers #18655

@dminuoso

Description

@dminuoso

Describe the bug

Given a SAML application with POST binding, the POST request back to the service provider carrying the SamlResponse is submitted twice on Chromium browsers in rapid succession. We have been able to replicate it with Edge, Chrome and Chromium on most recent versions.

How to reproduce

  1. Set up a SAML Provider with a POST binding
  2. Execute authentication flow in a chromium based browser
  3. Observe a double POST redirect in Network tab under developer tools

Expected behavior

A single POST request being sent out

Screenshots

Image

Additional context

The root cause seems to be an incorrect use of a lit lifecycle hook updated in ak-stage-autosubmit which triggers twice under some conditions.

updated(changed: PropertyValues<this>): void {
super.updated(changed);
if (this.challenge.url !== undefined) {
this.form?.submit();
}
}

Depending on network latency and the DOM interaction that first POST may fully be transmitted before it gets cancelled by the second POST. Our service provider rejects authentication attempts when it sees a SamlResponse being replayed, so whenever the race condition is complete it results in failed authentication attempts sporadically for us.

Deployment Method

Other (please specify)

Version

2025.10.2

Relevant log output

N/A

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingstatus/reviewingthanks for opening, we're taking a look

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions