Skip to content

soft_auto_provision=false is broken when unique user IDs are disabled #1169

Description

@jonas2515

When auto_provision = true, and soft_auto_provision = false, we're supposed to check if the user is already present in another backend here.

When at the same time, "Use unique user IDs" is disabled (so that the "sub" from the provider is used directly as the NC user id), this check appears to break though: A new user gets provisioned nicely on the first login via OIDC, but on the second time, login fails with "User conflict" here.

Possibly userManager->get($tokenUserId); returns the OIDC user now, because there's a match between "sub" from the identity provider and "user_id" in the NC tables. In that case I guess the solution would be to check the backend of the returned user object and ignore if the backend is ourself?

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