Enterprise SSO Login & Signup Component - PropelAuth Docs

Enterprise SSO Login & Signup

PropelAuth's Enterprise SSO Login & Signup component allows you to customize your login and signup pages by adding the ability to login with SAML / Enterprise SSO. It is designed to be used when your user has a Login State of LOGIN_REQUIRED.

We highly recommend reviewing the Login and Signup Guide if using any of our login or signup components.

SAML Login & Signup

Email

Login

Shadcn Installation

Install this component from our shadcn registry.

npx shadcn@latest add https://components.propelauth.com/r/enterprise-sso-login.json

Reference APIs

These are the APIs that are used by the above component. You can use these APIs directly in your own code.

loginViaSamlForOrg

Accepts either a domain, email, or org_id and returns a Enterprise SSO login URL for the specified organization. Works with both OIDC and SAML login.

Arguments

Response Functions

The response object has a handle function that you can use to handle the response. These functions can be async, and you can return values from them.

Request

const { loginViaSamlForOrg } = useAuthFrontendApis()

const response = await loginViaSamlForOrg({
    // only one of these is required
    email: "test@example.com",
    domain: "acme.com",
    org_id: "1189c444-8a2d-4c41-8b4b-ae43ce79a492"
})
response.handle({
    success(data) {
        // redirect to data.login_url
    },
    orgNotFound(error) {
        console.error('Org not found', error)
    },
    unexpectedOrUnhandled(error) {
        console.error('Unexpected or unhandled', error.user_facing_error)
    },
})

Successful Response

{
    "login_url": "https://example.com/saml/login"
}