Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FEATURE: Add probe-only functionality to SSO Provider protocol #22393

Merged

Commits on Aug 4, 2023

  1. FEATURE: Add prompt=none functionality to SSO Provider protocol

    This commit adds support for an optional `prompt` parameter in the
    payload of the /session/sso_provider endpoint.  If an SSO Consumer
    adds a `prompt=none` parameter to the encoded/signed `sso` payload,
    then Discourse will avoid trying to login a not-logged-in user:
    
     * If the user is already logged in, Discourse will immediately
       redirect back to the Consumer with the user's credentials in a
       signed payload, as usual.
    
     * If the user is not logged in, Discourse will immediately redirect
       back to the Consumer with a signed payload bearing the parameter
       `failed=true`.
    
    This allows the SSO Consumer to simply test whether or not a user is
    logged in, without forcing the user to try to log in.  This is useful
    when the SSO Consumer allows both anonymous and authenticated access.
    (E.g., users that are already logged-in to Discourse can be seamlessly
    logged-in to the Consumer site, and anonymous users can remain
    anonymous until they explicitly ask to log in.)
    
    This feature is similar to the `prompt=none` functionality in an
    OpenID Connect Authentication Request; see
    https://openid.net/specs/openid-connect-core-1_0.html#AuthRequest
    mdoggydog committed Aug 4, 2023
    Configuration menu
    Copy the full SHA
    6a568e2 View commit details
    Browse the repository at this point in the history