-
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, oauth): support native oauth providers #7443
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Interesting! I take it you are using this then (or integrating it currently, with plans to use it) or you probably would not have noticed that subtle parameters / customParameters difference I see in the last commit? I would love to know what your current usage status is (integrating, already in testing, out in production) - knowing it is in production gives me a lot of confidence in merging a PR besides just me looking at it, as I mentioned in the other PR I think This all looks reasonable, and the original PR also looked reasonable - I'd be happy to see this PR go in and enable the support. |
I'm using it in a project not yet in production. It's for a customer that has everything on microsoft so it just make sense to use microsoft oauth . And with firebase authentication, it makes it very easy to use. |
Hey everyone, I'm not sure if it's okay for me to jump in like this. I'm currently in the midst of integrating Microsoft's OAuth functionalities into my project and came across your pull request, which precisely addresses my needs. I've succeeded with OIDC method. I wanted to ask if there is a timeline on when will this be available? Also, if there’s anything specific I can do to help expedite this process. Thank you for your hard work on this project. |
Hey @Milutin-P 👋 no problem jumping in like this and I appreciate the prompt - this one is marked pending merge which is a note to myself that it appears to be ready to go. And the "waiting for user response" was just to do a quick survey on usage to make sure someone was using it, I got a positive response to that. Let me do a quick scan to make sure I'm not missing anything, then merge this + release |
I've been using it, for two weeks now. The project is currently in internal testing phase and have no issue to report. |
Thank you so much for the quick response. It's great to hear that the pull request is ready and that my input contributed to confirming its usage within the community. I'm looking forward to the release 🚀 Thank you both for your dedication and support. I'll let you know if I have any issues with it. |
@lpfrenette are you okay if I push changes to this PR on your branch in your repo? Not sure how that will affect your work flow - I'm ready to merge the functionality but I need to change the API shape so it conforms to the firebase-js-sdk docs, as we have a stated goal of being a drop-in replacement for firebase-js-sdk with respect to APIs In particular, in place of Similarly, in place of I'm happy to make this change and I have the stated goal while making the change that the functionality continues exactly the same, just under different API. I also need to export the functionality with compatible API shape for the new firebase-js-sdk v9 modular style, which shouldn't affect functionality but does require a code addition If you don't want me pushing to your branch I can make a new PR with the changes described above on a branch I create in the main repo, no issue either way |
Sure you can push in my branch, i've added you as a collaborator. :) |
@lpfrenette most people don't know this but the default setting for fork/branches in a fork-based repo is that the upstream repository maintainer can push direct to your fork/branch that backs the PR just 👊 -
...so I already had the ability and I don't need to be a formal collaborator but it seems rude as a maintainer to just do that without asking 😆 . Either way, I'll hop on it and see if I can't get this thing landed Thanks! |
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
.e and .w seem too high for things that can be expected to happen based on user input
I think during the rebase where I merged main back into this PR I got the nesting a little off here
420963f
to
d38ed83
Compare
rebased against main, and APIs (with associated docs) altered in javascript such that these APIs exist now:
they all take "provider" as a param, created as before ...those methods are there for v8 and v9 styles and I think I got the docs + typescript types and everything correct - I'll hear about it from you or a future user if not certainly :-) pushed that all to the fork/branch backing this. iOS will fail in CI for unrelated reasons, the e2e suite passes locally. I'll let it sit like this probably until Sunday evening / Monday morning in case you or anyone has a chance to review, then I'll address comments if any + merge + release Cheers! |
Co-authored-by: Milutin <[email protected]>
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #7443 +/- ##
=============================================
- Coverage 53.72% 18.64% -35.07%
+ Complexity 738 309 -429
=============================================
Files 248 248
Lines 12163 12324 +161
Branches 1897 1924 +27
=============================================
- Hits 6533 2297 -4236
- Misses 5279 9291 +4012
- Partials 351 736 +385 |
Just applied the patches with the new change, and after a little code refactoring in my app everything works like a charm |
somehow this doesn't show up on macOS but it does on ubuntu and ci checks are on ubuntu
The review and the success report are invaluable @Milutin-P and @lpfrenette - really appreciated. Once I get the various lint checks to go - none of which will affect behavior a bit - I'll merge and release this now Huge credit to @KielKing for the original PR, we've all been working hard on it of course but we are for the most part carrying your original work here to completion after a few months of delay. All the effort is really appreciated! |
Thank you both immensely for your commitment and hard work. |
@mikehardy @lpfrenette Something is wrong. I've used the example from the docs: const provider = new auth.OAuthProvider('microsoft.com');
provider.addScope('offline_access');
auth().signInWithRedirect(provider); And I get a typescript error saying Integration works fine, that's good. But the interface for |
If it is just types, that's great - those are usually easy to fix, especially given we have firebase-js-sdk as a reference. I'll take a look |
@mikehardy @lpfrenette Additionally, I observed that in our index.d.ts, the new keyword is not employed. There's also an eslint ignore comment present: // eslint-disable-next-line @typescript-eslint/no-misused-new
new (providerId: string): AuthProvider;` Naturally, since I'm very stubborn, it will overwhelm me at some point and I won't find peace until I resolve it. So, I'll try again at some point. |
Description
Fixed the code for ios for using microsoft.com oauth provider.
Used the PR 7187 from https://github.com/KielKing/react-native-firebase/tree/feature/Support_Native_OAuth_Providers
Related issues
Release Summary
Checklist
Android
iOS
e2e
tests added or updated inpackages/\*\*/e2e
jest
tests added or updated inpackages/\*\*/__tests__
Screenshot of successful login
Think
react-native-firebase
is great? Please consider supporting the project with any of the below:React Native Firebase
andInvertase
on Twitter