Fix: Retrieve Twitter and GitHub usernames via OAuth#127
Conversation
kangmingtay
left a comment
There was a problem hiding this comment.
Hey @dsumer, thanks for contributing! Yeah, initially, I decided to use the /authorize endpoint instead of /authenticate because the twitter docs kinda recommended it. But, in terms of user-friendliness, i can see why it can be a pain to ask your users if they want to share their data every time they sign in.
…t with the API naming
|
@kangmingtay @awalias how should we proceed with this? :) .. I can also change the user_name field to 'login' and 'screen_name' respectively this change is a bit of a blocker for me as I need the username in order to integrate supabase auth into my product :D |
sorry for the delay, yeah we had a discussion today about this and we agreed that gotrue should take care of abstracting the definition of |
|
🎉 This PR is included in version 1.10.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
|
@kangmingtay thanks for the fast merge! when will those changes be available in production? |
|
@dsumer we're currently testing it out with a few other changes (e.g. twitch integration & custom smtp sender name) in our staging environment and will be looking to roll it out in the next few weeks! |
|
Hey @kangmingtay, any eta on this? At the moment I'm having to query the github api like this: #83 (comment) |
|
Oh wait, for some reason it now exists. Think I needed additional scope... doh! |
Fix: Retrieve Twitter and GitHub usernames via OAuth
What kind of change does this PR introduce?
During the OAuth login the usernames from Twitter and GitHub are retrieved and saved as meta_data of the user.
Additionally I've changed the authorization URL of Twitter from
https://api.twitter.com/oauth/authorizetohttps://api.twitter.com/oauth/authenticateso that the user only has to authorize the application on the first login, instead of at every login.What is the current behavior?
Usernames from Twitter and GitHub are not retrieved.
The user has to authorize the Twitter App on every login again.
What is the new behavior?
Usernames from Twitter and GitHub are retrieved and saved as meta_data.
The user only has to authorize the Twitter App on the first login.
Additional context
Description for the /authenticate URL from Twitter:
https://developer.twitter.com/en/docs/authentication/api-reference/authenticate