Skip to content

Creating user with SSO also asks registation token #5383

@olmari

Description

@olmari

Describe the bug
We have enabled both password login with registation token and SSO, current MAS version asks registation token when using SSO which it should not.

To Reproduce
Steps to reproduce the behavior:

  1. Have MAS config as listed below
  2. Try to create user (login) with SSO
  3. In the last step MAS asks for registration token

Expected behavior
When using SSO, no registation token is expected.

Screenshots
Fine up to this point:

Image

After clicking the "Create user" -button, this happens when should not:

Image

Using MAS 1.8.0

Additional context
MAS config snippet for relevant part:

passwords:
  enabled: true
  schemes:
  - version: 1
    algorithm: bcrypt
  - version: 2
    algorithm: argon2id
  minimum_complexity: 3
matrix:
  kind: synapse
  homeserver: hacklab.fi
  secret: <redacted>
  endpoint: "http://localhost:8008"
upstream_oauth2:
  providers:
    - id: "<redacted>"
      issuer: "https://sso.hacklab.fi/realms/hacklabfi"
      human_name: "Hacklab Finland SSO"
      brand_name: "Hacklab.fi"
      token_endpoint_auth_method: client_secret_basic
      client_id: "matrix-authentication-service"
      client_secret: "<redacted>"
      scope: "openid profile email"
      claims_imports:
        localpart:
          action: ignore
          template: "{{ user.preferred_username }}"
        displayname:
          action: suggest
          template: "{{ user.name }}"
        email:
          action: suggest
          template: "{{ user.email }}"
          set_email_verification: always
account:
  registration_token_required: true
  password_registration_enabled: true

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-Registration-FlowRelated to the user registration flowA-Upstream-OAuthRelated to login via upstream OAuth 2.0 providers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions