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, ios): Add support for Facebook Limited Login #6073

Merged
merged 3 commits into from
Feb 15, 2022
Merged

feat(auth, ios): Add support for Facebook Limited Login #6073

merged 3 commits into from
Feb 15, 2022

Conversation

MegaMaddin
Copy link
Contributor

@MegaMaddin MegaMaddin commented Feb 14, 2022

Description

Add support for Facebook Limited Login, as well as some testing and documentation around that feature.

Related issues

Fixes #5441.

Release Summary

Add support for Facebook Limited Login.

Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
    • Yes
  • My change supports the following platforms;
    • Android
    • iOS
  • My change includes tests;
    • e2e tests added or updated in packages/\*\*/e2e
    • jest tests added or updated in packages/\*\*/__tests__
  • I have updated TypeScript types that are affected by my change.
  • This is a breaking change;
    • Yes
    • No

Test Plan

Using this patchset in one of my own apps, login into Facebook w/ and w/o limited login is still functional:

userStateChanged to {
    "displayName": "Martin Maze",
    "email": null,
    "emailVerified": false,
    "isAnonymous": false,
    "metadata": {
        "creationTime": 1644870528653,
        "lastSignInTime": 1644875913305
    },
    "phoneNumber": null,
    "photoURL": "https://graph.facebook.com/137XXXXXXXXXX/picture",
    "providerData": [[Object]],
    "providerId": "firebase",
    "refreshToken": "AI....",
    "tenantId": null,
    "uid": "XXXYYYZZZZ"
}

🔥

@CLAassistant
Copy link

CLAassistant commented Feb 14, 2022

CLA assistant check
All committers have signed the CLA.

@vercel
Copy link

vercel bot commented Feb 14, 2022

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployments, click below or on the icon next to each commit.

react-native-firebase – ./

🔍 Inspect: https://vercel.com/invertase/react-native-firebase/6n4jz3FjC2nrWh9C7TddngfnDjUJ
✅ Preview: https://react-native-firebase-git-fork-megamaddin-ios-8939cd-invertase.vercel.app

react-native-firebase-next – ./website_modular

🔍 Inspect: https://vercel.com/invertase/react-native-firebase-next/7zRJTWvkAMA1iHm2dJd8Aua6bKB7
✅ Preview: Canceled

[Deployment for a3a1abb canceled]

mikehardy
mikehardy previously approved these changes Feb 14, 2022
Copy link
Collaborator

@mikehardy mikehardy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, this looks great, thank you for the PR! Hopefully CI goes green, frequently there is some trivial lint thing but I don't see anything with the naked eye right now...

@codecov
Copy link

codecov bot commented Feb 14, 2022

Codecov Report

Merging #6073 (bf82870) into main (a217978) will not change coverage.
The diff coverage is 0.00%.

❗ Current head bf82870 differs from pull request most recent head a3a1abb. Consider uploading reports for the commit a3a1abb to get more accurate results

@@            Coverage Diff            @@
##               main    #6073   +/-   ##
=========================================
  Coverage     52.92%   52.92%           
  Complexity      622      622           
=========================================
  Files           208      208           
  Lines         10220    10220           
  Branches       1625     1626    +1     
=========================================
  Hits           5408     5408           
  Misses         4558     4558           
  Partials        254      254           

Add support for Facebook Limited Login by making passing a second argument to
the providers `credential` function optional and handling this later on in the
native code by calling the OAuth provider for Facebook.

Fixes: #5441
Signed-off-by: Martin Mazein <[email protected]>
This is just simply testing if the nonce passed to credentials is the nonce we
see in the providers credential object.

Signed-off-by: Martin Mazein <[email protected]>
@MegaMaddin
Copy link
Contributor Author

Fixed format errors.

@MegaMaddin MegaMaddin requested a review from mikehardy February 14, 2022 23:45
Copy link
Collaborator

@mikehardy mikehardy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

at a computer now (was mobile prior) and still looks good to me. I approved the second CI run, hopefully goes green this time ;-)

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.

🔥[🐛] iOS unable to signInWithCredential using Facebook Limited Login
3 participants