Skip to content

OAuth2 + “Disallow User Registration” prevents new users from being created via external IdP #5648

@wolkenschieber

Description

@wolkenschieber

Pre-submission Checklist

  • I have searched the existing issues and this bug has not been reported yet
  • I have tested this issue on the demo site or the latest version

Where did you encounter this bug?

Latest stable version (self-hosted)

Memos Version

v0.26.1

Bug Description

When OAuth2 authentication is configured and the “Disallow user registration” setting is enabled, new users authenticating through an external Identity Provider (IdP) are not created in the system.

This results in successful authentication at the IdP level but failure to provision a corresponding local user account.

Steps to Reproduce

  1. Configure OAuth2 with an external IdP.
  2. Enable “Disallow user registration” in system settings.
  3. Attempt login with a user that:
    1. Exists in the external IdP
    2. Does NOT yet exist in the local system
  4. Observe login behavior.

Expected Behavior

One of the following:

  • Option A: External IdP users should still be auto-provisioned even if local registration is disabled.
  • Option B: System should clearly document that external user provisioning is blocked when registration is disabled.
  • Option C: Provide a separate toggle for:
    • Local user self-registration
    • External IdP auto-provisioning

Screenshots & Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions