Comments (6)
I've sorted the issue. @zRelux Thanks for your suggestion and @mikehardy thanks for your efforts too.
I also found out that I was making a mistake by trying to access the user credentials from here directly:
const result = await LoginManager.logInWithPermissions([
'public_profile',
'email',
]);
console.log(result)
I had to get the user AccessToken, pass it unto auth (from '@react-native-firebase/auth) before gaining access to the user credentials.
import auth from '@react-native-firebase/auth';
if (result.isCancelled) {
throw 'User cancelled the login process';
}
// Once signed in, get the users AccessToken
const data = await AccessToken.getCurrentAccessToken();
if (!data) {
throw 'Something went wrong obtaining access token';
}
// Create a Firebase credential with the AccessToken
const facebookCredential = auth.FacebookAuthProvider.credential(
data.accessToken,
);
// Sign-in the user with the credential
auth().signInWithCredential(facebookCredential);
auth().onAuthStateChanged((user)=>console.log(user));
from react-native-fbsdk-next.
Maybe related, react-native-firebase auth is having difficulty consuming the output from this module at the moment, that issue could use more triage before saying it is definitely related: invertase/react-native-firebase#5106
from react-native-fbsdk-next.
@PrincewillIroka thanks for reporting this bug.
Does it happen all the time?
Would you mind to clone this repo and implement some test for it in order to reproduce?
That would help me a lot in order to debug it and specially having your constraints (environment and platform) set to reproduce :)
from react-native-fbsdk-next.
Be sure to check that you have enabled the facebook auth in the firebase console. I had the same issue, and enabling it fixed the problem
from react-native-fbsdk-next.
Interesting! That might explain why I have not been able to reproduce it in my project or help (I maintain react-native-firebase and wanted to solve this one...) thanks @zRelux - curious to here from @PrincewillIroka if that was the problem
from react-native-fbsdk-next.
Glad to see that everything went fine in this issue :)
from react-native-fbsdk-next.
Related Issues (20)
- Access Token is invalid HOT 8
- React native app - Upgrade fbsdk to version 9.0.0 HOT 1
- Mobile product ads aka Advantage+ Catalog Ads not receiving params HOT 2
- Upgrading to v13.0.0 , build failed for android HOT 6
- iOS limited login does not return all possible fields HOT 1
- Invalid ID token from login response. HOT 3
- (iOS) ShareDialog.show(shareContent) does not show any sharing options. HOT 1
- (iOS) Automatic purchase event is not logging in iOS sdk 17.0.0 HOT 4
- Compiling for iOS 13.0, but module 'ExpoModulesCore' has a minimum deployment target of iOS 13.4 HOT 3
- [IOS] Missing 'Cancel' and 'Continue' buttons when login by FB app HOT 7
- iOS limited login sdk 17 HOT 5
- Error while login facebook login in expo app HOT 5
- Not Found react-native-fbsdk-next in the Maven Repository
- fetchDeferredAppLink() returns undefined HOT 1
- App Events Not Logging HOT 2
- Facebook SDK Integration Issue in React Native App for iOS 14+ HOT 3
- How can we securely add app details in our code HOT 1
- accessToken returned on iOS is invalid HOT 12
- Specific App Custom Events Not Logging
- Error: Invalid Signature
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-fbsdk-next.