maykinmedia / mozilla-django-oidc-db

Database-backed settings for mozilla-django-oidc, with modified unique identifiers for users
MIT License
4 stars 0 forks source link

Allow using payload instead of userinfo to map claims for users #59

Closed stevenbal closed 1 year ago

stevenbal commented 2 years ago

Currently, claims can only be mapped with the userinfo, but it would be nice if there was an option to use the payload / id_token.

The get_userinfo function from mozilla-django-oidc can be overridden to make this possible: https://github.com/mozilla/mozilla-django-oidc/blob/main/mozilla_django_oidc/auth.py#L235.

This could also be a difference between OIDC v1 and v2, so that should probably be looked into first