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

Respect preferred username #29

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ercpe
Copy link

@ercpe ercpe commented Nov 7, 2019

Setting id_token_object['sub'] as the username is fine for new users, but doesn't migrate existing user profiles softly after migrating to Keycloak.

ercpe added 2 commits November 6, 2019 08:51
A swappable user model may not have a dedicated `username` field and use (e.g.) the email field to identify users.
Don't assume that user models have that field and instead add it only if the fields declared by `USERNAME_FIELD` and `EMAIL_FIELD` differ when creating the local user record.
Setting `id_token_object['sub']` as the username is fine for new users, but doesn't migrate existing user profiles softly after migrating to Keycloak.
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

Successfully merging this pull request may close these issues.

1 participant