-
-
Notifications
You must be signed in to change notification settings - Fork 555
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
feat(auth): github OAuth provider option in login #986
feat(auth): github OAuth provider option in login #986
Conversation
…case provider name | check for apple.com | pass down providerName to OAuthProvider when microsoft or apple | added apple to supportedAuthProviders
Codecov Report
@@ Coverage Diff @@
## master #986 +/- ##
==========================================
+ Coverage 88.33% 88.34% +0.01%
==========================================
Files 29 29
Lines 797 798 +1
==========================================
+ Hits 704 705 +1
Misses 93 93 |
const lowerCaseProviderName = providerName.toLowerCase() | ||
|
||
if ( | ||
lowerCaseProviderName === 'microsoft.com' || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most likely going to update this to be an array instead of multiple if conditions since that will also make it easy to add to the list:
['microsoft.com', 'apple.com', 'yahoo.com'].includes(lowerCaseProviderName)
It definetly does help thanks! Really glad to hear that the package has been useful to you |
* feat(populate): added support for `storeAs` when populating child from redux - @nagarjuna993 * fix(types): change `updateProfile` return type (#975) - @nikitakost * feat(auth): github OAuth provider option in login (#986) - @davidepalazzo * chore(deps): update babel dev dependencies to ^7.10.4
Description
Hey there, this PR is for #971. I stumbled across this issue and since I'm working on a project that uses the Apple auth I thought it would have been worth it to add the other providers too.
The main addition in this PR is the provider type for the Credentials. I edited
createAuthProvider
to account for apple.com and yahoo.com and added it tosupportedAuthProviders
.The unit test has been updated also to reflect the addition I made.
It's not a big one but hopefully it helps. Btw, I started using this package a couple of months ago and I'm loving it so far.
Let me know if there's anything that might need changing. Cheers.
Check List
If not relevant to pull request, check off as complete
Relevant Issues
#971