Skip to content

Cannot find id field on OIDC sources #16115

@luechtdev

Description

@luechtdev

Describe the bug
When logging in via Gitlab OIDC source, the error "Could not determine id." is thrown. Because there is no field named "id" in the oauth callback from Gitlab.

To Reproduce
On a fresh install, create a GitLab social login, add it to the default identification stage and try to log in via gitlab.

Expected behavior
It should be able to create a user based on the Gitlab callback.
I patched the get_user_id function locally to fallback to the "sub" field if "id" does not exist and it works flawlessly.

Version and Deployment:

  • authentik version: 2025.6.3
  • Deployment: docker-compose

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