The saml_login_required error
If your app starts an OTP login for an enforced email, the server responds with 403 saml_login_required. startOTP routes failures through the SDK’s error mapper, so it throws a typed SAMLLoginRequiredError, exported as PrldErrors.SAMLLoginRequired:
Fall back to SAML
OnSAMLLoginRequiredError, restart the flow with loginWithSAMLByEmail. It resolves the connection from the same email domain and redirects the user to the Identity Provider:
challenge_token, which you finalize exactly as in the SAML Login guide.
The fallback is transparent: the user enters their email expecting an OTP and
is seamlessly redirected to their company’s SSO instead. No separate “Sign in
with SSO” button is required.
Try it
Try it
This single email field starts an OTP login and silently upgrades to SAML when the domain enforces SSO.
src/App.jsx