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

OAuth2 Duplicate User Error #11443

Open
philsjh opened this issue Sep 20, 2024 · 0 comments
Open

OAuth2 Duplicate User Error #11443

philsjh opened this issue Sep 20, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@philsjh
Copy link

philsjh commented Sep 20, 2024

Describe the bug

  • I have GitHub OAuth2 set up as a federation provider in Authentik with the user:read, and user:email scopes. The configuration is set up to match on email addresses, but I have also tried username and UPN and a few other options.
  • I have an application tied to an access group which my user is added to.
  • The application uses the GitHub OAuth2 configuration as an authentication source.
  • I log in via GitHub and arrive on the user dashboard.
  • I can see the application on the user dashboard.
  • I click on the application, and it sends me to log in again (despite the fact I'm already logged in)
  • When I log in via GitHub SSO, I get "Server Error" and on checking the logs it appears to be trying to create the user again, despite the fact I'm already logged in.

Relevant info
version 2024.8.2
running on kubernetes

Screenshots
image

Logs

{"event": "Internal Server Error: /source/oauth/callback/github/", "exception": [{"exc_type": "IntegrityError", "exc_value": "duplicate key value violates unique constraint \"authentik_core_usersourc_user_id_source_id_ad1f5aa7_un │
│ iq\"\nDETAIL:  Key (user_id, source_id)=(7, <clipped>) already exists.", "frames": [{"filename": "/ak-root/venv/lib/python3.12/site-packages/asgiref/sync.py", "lineno": 518, 

Version and Deployment (please complete the following information):

  • authentik version: 2024.8.2
  • Deployment: helm

Additional context

Happens every time - tried custom flows without the "write" too.

@philsjh philsjh added the bug Something isn't working label Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant