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

feat(auth): github OAuth provider option in login #986

Conversation

davidepalazzo
Copy link

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 to supportedAuthProviders.

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

  • All tests passing
  • Docs updated with any changes or examples if applicable
  • Added tests to ensure new feature(s) work properly

Relevant Issues

#971

@codecov
Copy link

codecov bot commented Jul 24, 2020

Codecov Report

Merging #986 into master will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            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              

@davidepalazzo davidepalazzo changed the title Feature/create auth provider extension feat(auth): github OAuth provider option in login Jul 25, 2020
const lowerCaseProviderName = providerName.toLowerCase()

if (
lowerCaseProviderName === 'microsoft.com' ||
Copy link
Owner

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)

@prescottprue prescottprue changed the base branch from master to v3.7.0 July 25, 2020 21:45
@prescottprue
Copy link
Owner

It definetly does help thanks! Really glad to hear that the package has been useful to you

@prescottprue prescottprue merged commit caf7b39 into prescottprue:v3.7.0 Jul 25, 2020
@prescottprue prescottprue mentioned this pull request Jul 25, 2020
3 tasks
prescottprue added a commit that referenced this pull request Jul 26, 2020
* 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
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.

2 participants