Skip to content

Use user's "id" as OAuth2 "sub" during authentication #940

@jirik

Description

@jirik

Currently Wagtail's OAuth2 Introspection endpoint returns only username as ID of the user. Layman currently uses username from the endpoint as OAuth2 sub in src/layman/authn/oauth2/__init__.py, but Layman also uses user's "id" from Wagtail's User profile endpoint as OAuth2 sub. It results into inconsistency in user's OAuth2 sub on Layman and it could result into unknown bugs.

Because username can be easily changed on Wagtail, we prefer to use always user's "id" as OAuth2 sub.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions