-
Notifications
You must be signed in to change notification settings - Fork 193
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
Populate username from sociallogin #577
Populate username from sociallogin #577
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #577 +/- ##
=======================================
Coverage 91.97% 91.97%
=======================================
Files 323 323
Lines 18690 18690
=======================================
Hits 17190 17190
Misses 1500 1500 ☔ View full report in Codecov by Sentry. |
As discussed in Slack, the changes look OK but will need some testing. I tried the change with Google auth, which caused the account name and username to be set to Google User and googleuser, respectively. There's probably an easy change to fix your issue with Open ID and Jump Cloud while keeping the same desirable functionality with Microsoft, Google, and others. I will look into it more this week. |
This change should only affect the username, so I think this indicates there may be a bug with the subsequent code under Nothing jumps out to me on where I'll see if I can test one of these other providers locally, too. |
Tested Ok with GitHub OAuth.
|
How is your Google OAuth app set up? I just tested on my end and the name turned out okay. The username ended up being the Google account's first/given name. So, I'll update this PR in a few with a fallback to use to the first part of the email address.
In this case, the Ghostwriter user was created with the following:
|
The updated commit results now in the Ghostwriter user being:
|
Thanks for taking a crack at that. As mentioned in Slack, it was a temporary issue on Google's end. With no change, I stopped receiving "Google User" as an account name when I started testing this morning, so I have to imagine it was on Google's side. I have tested your latest changes and everything looks good. I'll merge it for the next release. |
This should resolve #576.
It prioritizes the username from
data
and uses sociallogin as the fallback.