-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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): Add support for native federated OAuth Providers (Microsoft, Yahoo) #7187
feat(auth): Add support for native federated OAuth Providers (Microsoft, Yahoo) #7187
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Hello 👋, this PR has been opened for more than 2 months with no activity on it. If you think this is a mistake please comment and ping a maintainer to get this merged ASAP! Thanks for contributing! You have 15 days until this gets closed automatically |
Hi @mikehardy, sorry I was informed to ping a maintainer |
No worries! There is steady progress in the repo and not that many open PRs at the moment, hopefully get a chance to review soon |
Hello 👋, this PR has been opened for more than 2 months with no activity on it. If you think this is a mistake please comment and ping a maintainer to get this merged ASAP! Thanks for contributing! You have 15 days until this gets closed automatically |
Any chance this could be revived? It looks like it might be very helpful for a project we're working on |
Yes, it was open on purpose but our stale bot is ignoring pins at the moment. Still working through full repo infrastructure at the moment but hopefully someone has time to finish this or I do in the future |
For those interested, i've made a patch to use with path-package from this pull request. @react-native-firebase+auth+18.6.1.patch
|
Methods such as getCredentialWithUIDelegate and linkWithCredential are asynchronous, meaning the local variable builder or user would be prematurely deallocated by ARC after the function has ended. Resolve this by using __block, ensuring that the variable is retained until the completion block has finished executing
8f66649
to
24c9bcf
Compare
@lpfrenette - I've just rebased this one against current main / 18.6.1 and solved the various conflicts etc - that will also cause it to generate a fresh set of patch-package patches available here https://github.com/invertase/react-native-firebase/actions/runs/6775452367?pr=7187 I'd appreciate any feedback you have on the PR, knowing that someone is using it gives me a lot more confidence merging it. Hoping to get this in sometime soon 🤞 |
@mikehardy I've applied the new patch. I managed to make it work with android, but with IOS i still get the invalid credential error. I will keep on investigating. But maybe in the doc you could add : For azure mutli-tenant
Not sure if i did it right, but I've created a PR for my changes in IOS and in the docs. I don't want to take the credit for the rest of the work that was done by @KielKing |
Description
react-native-firebase doesn't currently support Microsoft authentication (without OpenID). Given that I already utilize Microsoft authentication on my web application, I wanted to do the same for mobile. I found a PR (#6574: Add support for OpenID Connect provider) that resolved the issue by supporting OpenID Connect provider. As per the docs I used react-native-app-auth to retrieve the user's Microsoft access token.
Although working, web and mobile users who want to sign in using Microsoft rely on separate providers, even though both are associated with the same Microsoft App Registration. E.g. users who signed up via Microsoft on the web would not have the same provider on mobile, meaning to use Microsoft sign in on mobile, users need to link their account to the same Microsoft account (but now with OpenID).
I saw that manual handling of the sign-in flow was not possible.
I'm not that familiar with the native side, so please feel free to adjust any code 😄
Pending Feature
Need to store access token received from the OAuth provider. This would allow to perform API requests on the respective providers, such as the Microsoft Graph API or Yahoo API.
Related issues
Does not fix these issues: #6305, #4731, but gives an opportunity to use the native Microsoft Sign-In flow instead of creating an OpenID provider.
Release Summary
Added support for native federated OAuth Providers (Microsoft, Yahoo)
Checklist
Android
iOS
e2e
tests added or updated inpackages/\*\*/e2e
jest
tests added or updated inpackages/\*\*/__tests__
Test Plan
Will develop this at a later time
Think
react-native-firebase
is great? Please consider supporting the project with any of the below:React Native Firebase
andInvertase
on Twitter🔥