Skip to content

SSO: Add email-scoped provider discovery for multi-tenant support #358

Closed

Description

@larryro

Context

PR #354 introduced SSO provider discovery, but the current implementation validates the email parameter without using it in the actual provider lookup.

Current Behavior

  • ssoDiscoverHandler validates the email parameter
  • getSsoConfig returns the first configured provider without considering email
  • This means any configured provider returns ssoEnabled=true for all emails

Proposed Solution

For multi-tenant email-scoped routing:

  1. Add email domain matching field to ssoProviders schema
  2. Update getSsoConfig to accept and filter by domain
  3. Update all 6 callers to pass the domain

Alternatively, for single-provider instances, document that email validation is for format checking only.

Related

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions