Skip to content

fix: saml enterprise sso sign in - #424

Open
MarkOSullivan94 wants to merge 3 commits into
mainfrom
421-enterprise-saml-sso-sign-in-never-completes-oauthsignin-drops-identifier-and-parsedeeplink-ignores-the-saml-verification-strategy
Open

fix: saml enterprise sso sign in#424
MarkOSullivan94 wants to merge 3 commits into
mainfrom
421-enterprise-saml-sso-sign-in-never-completes-oauthsignin-drops-identifier-and-parsedeeplink-ignores-the-saml-verification-strategy

Conversation

@MarkOSullivan94

@MarkOSullivan94 MarkOSullivan94 commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

Resolves #421

This pull request addresses two bugs related to SSO and SAML authentication flows, ensuring correct handling of the identifier for enterprise SSO sign-ins and proper SSO detection for SAML strategies. It adds new tests to verify these behaviors and refactors the sign-in panel logic to improve handling of enterprise SSO factors.

Bug fixes and authentication logic improvements:

  • The oauthSignIn method now forwards the identifier from the existing SignIn object when using the enterprise_sso strategy, ensuring the server can resolve the correct SAML connection.
  • The isSSO getter in the Strategy class now treats the saml strategy as SSO, fixing issues where SAML-based sign-ins were not recognized as SSO.

Sign-in panel logic refactor:

  • The sign-in panel now sets a flag (needsEnterpriseSSO) if enterprise SSO is required, and calls ssoSignIn after the main sign-in attempt, improving control flow and error handling. [1] [2] [3]

Testing and coverage:

  • Adds unit tests to verify that oauthSignIn correctly forwards the identifier for enterprise SSO, and that parseDeepLink completes sign-in when the verification strategy is SAML. Supporting test utilities for capturing HTTP requests are also included. [1] [2]
  • Adds a unit test to ensure the isSSO getter returns true for the saml strategy.

Additional thoughts

As signing in with Okta requires interaction with a web view it would be a good idea if we could add a Patrol test for this entire flow to avoid future regressions in the future

@github-actions
github-actions Bot requested a review from slightfoot June 25, 2026 15:42
@MarkOSullivan94 MarkOSullivan94 added clerk_auth package: clerk_auth clerk_flutter package: clerk_flutter okta An issue related to Okta SSO labels Jun 25, 2026
@MarkOSullivan94
MarkOSullivan94 marked this pull request as ready for review June 25, 2026 15:52
@MarkOSullivan94

Copy link
Copy Markdown
Collaborator Author

@sarkisdev can you confirm if this fixes the issues you were facing?

I was able to sign in successfully with Okta after implementing these changes but if you are still noticing some problems please let me know and I'll investigate further

@MarkOSullivan94 MarkOSullivan94 added the enterprise sso An issue affecting Enterprise SSO label Jun 25, 2026
@MarkOSullivan94
MarkOSullivan94 force-pushed the 421-enterprise-saml-sso-sign-in-never-completes-oauthsignin-drops-identifier-and-parsedeeplink-ignores-the-saml-verification-strategy branch from 81c444d to 57b897f Compare June 25, 2026 16:08
@MarkOSullivan94 MarkOSullivan94 added this to the v0.0.17-beta milestone Jun 25, 2026
@MarkOSullivan94
MarkOSullivan94 force-pushed the 421-enterprise-saml-sso-sign-in-never-completes-oauthsignin-drops-identifier-and-parsedeeplink-ignores-the-saml-verification-strategy branch from 57b897f to 8aa534a Compare July 7, 2026 12:22
@slightfoot slightfoot modified the milestones: v0.0.17-beta, v0.0.18-beta Jul 16, 2026
@slightfoot
slightfoot force-pushed the main branch 2 times, most recently from 71a3098 to 5dcfe4b Compare July 16, 2026 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clerk_auth package: clerk_auth clerk_flutter package: clerk_flutter enterprise sso An issue affecting Enterprise SSO okta An issue related to Okta SSO

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enterprise SAML SSO sign-in never completes: oauthSignIn drops "identifier", and parseDeepLink ignores the "saml" verification strategy

2 participants