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

Can't get SSO to match authentik user to existing user #18008

Closed
sakibstark11 opened this issue Dec 7, 2024 · 3 comments
Closed

Can't get SSO to match authentik user to existing user #18008

sakibstark11 opened this issue Dec 7, 2024 · 3 comments

Comments

@sakibstark11
Copy link

I've been using matrix for about a year now. Recently I started switching my services over to authentik and I did the same for matrix synapse. Except an issue I seem to be getting is despite both matrix and authentik sharing the same user name, when I log in with authentik, it creates a new user. I am not sure if this is a bug or not.
I'll add some of my configs here for clarity.

...yml
enable_registration: false
oidc_providers:
    - idp_id: authentik
      idp_name: authentik
      allow_existing_users: true
      discover: true
      issuer: "https://authentik.me/application/o/matrix/"
      client_id: "secret"
      client_secret: "secret"
      scopes:
          - "openid"
          - "profile"
          - "email"
      user_mapping_provider:
          config:
              localpart_template: "{{ user.preferred_username }}"
              display_name_template: "{{ user.name }}"
              email_template: "{{ user.email }}"

Any assistance would be much appreciated. Thanks

@sakibstark11
Copy link
Author

Strange that I'm not getting any comments. Perhaps I've not given enough information. Feel free to let me know what else I need to add.

@sakibstark11
Copy link
Author

So i had to remove the existing bindings (api calls to set external_ids: []), and using

      allow_existing_users: true
      enable_registration: false
      user_mapping_provider:
          config:
              localpart_template: "{{ user.preferred_username }}"
              display_name_template: "{{ user.name }}"
              email_template: "{{ user.email }}"

worked,

@UncleArya
Copy link

Hey there. I am having the same issue you are but I am not able to troubleshoot mine like you did. Would you be able to give me any advice for what to change to get this working? You mention changing some API settings? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants