The supplied auth credential is malformed or has expired in react native fb login - react-native

I want to make facebook login in my react native with firebase but after I integrate everything i got that error
[Error: [auth/invalid-credential] The supplied auth credential is malformed or has expired. [ Unsuccessful debug_token response from Facebook: {"error":{"message":"(#100) The App_id in the input_token did not match the Viewing App","type":"OAuthException","code":100,"fbtrace_id":"AEYcUHj2aA0jqZQtrlGvmWA"}} ]]
I checked different solution but none of them help me . I recheck app id and secret in facebook developer and firebase console and both of them are same . what are the other possibilities in that case?

Try restarting the emulator, it worked for me

Related

UBER EATS API EXPO AUTHENTICATION USING EXPO

I'm new to expo and i've been trying to integrate the uber authentication to my app and i've tried the authentication example shown in the authentication page of expo documentation for uber.
Uber Example Authentication in expo documentation
https://docs.expo.io/guides/authentication/#uber
And when I Login in browser I get an invalid_request.
I tried debugging the object and says my scopes are invalid, and i checked the documentation and the scopes are correct so idk how to solve this problem.
The debug result here
Any Help would be appreciated!
I've found the problem, I didn't need to identify the scopes because he would receive the authorization url with the scopes inside.

expo-notifications getDevicePushTokenAsync on iOS returns a token that’s not FCM and does not work with firebase

SDK Version: 40
Platforms(Android/iOS/web/all): iOS
Add the appropriate "Tag" based on what Expo library you have a question on.
Hi, I'm using react native with expo and expo-notifications, and send notifications with firebase messages in firebase functions.
The integration works great with android, not so much with iOS, the token that's returned seems to be an apn token not an FCM, and firebase admin rejects the token with "The registration token is not a valid FCM registration token"
I tried to use "https://iid.googleapis.com/iid/v1:batchImport" (following this guide: https://www.thepolyglotdeveloper.com/2017/06/apns-tokens-fcm-tokens-simple-http/) with returns a valid FCM token, and works with Firebase Notification Composer, I can get notifications through that interface, but if I try to do the conversion and send notifications from the generated FCM using firebase i get an error from firebase "SenderId mismatch".
I have the credentials correctly added into firebase iOS client, as proven by the Firebase Notification Composer, but somehow, expo is returning a token that is not signed with the same SenderId as firebase and the admin does a check the Composer does not? No sure what's the case.
In short:
I would like to get a FCM token from Notifications.getDevicePushTokenAsync(), which should be possible, or was possible (at least there are some discussions in the github issues).
The firebase function code is :
return admin
.messaging()
.send({
token: registrationTokens,
data: {...}
and the react native:
token = (await Notifications.getDevicePushTokenAsync()).data;
(both work perfect with Android)
also in expo forum: https://forums.expo.io/t/expo-notifications-getdevicepushtokenasync-on-ios-returns-a-token-thats-not-fcm-and-does-not-work-with-firebase/52155

Logout issue regarding access token expiry in React native App

I am working on a react native app that has a PHP backend. I am getting an issue with OAuth2. Following is the scenario.
User enters the login screen, he will get an access token. Which is
saving in async storage.
Whenever the user is successfully identified, the auth service provider issues an access_token and refresh_token
The app uses the access token to fetch more user information.
access token is expired. Then I got into the app and closed sooner(which will send a request for a new access token but upon closing the app, the response won't be stored in the device, rather it will update the backend refresh token). This causes refresh token mismatch and lead to app log out.
When I'm trying to open the app I get thrown out and I need to log in again due to the mismatch of refresh token at backend and async storage.
Any ideas are welcome!

Getting error while trying to sign in with Facebook

I'm using React Native Firebase Authentification and Facebook SDK for signing in. It was working completely fine but now I'm getting this error
[Error: [auth/configuration-not] An internal error has occurred. [ CONFIGURATION_NOT_FOUND ]]
Please check project_id in you google-services.json and also in your firebase console if facebook auth in enabled or not.

how to integrate google login without firebase in bare Expo App

I want to implement Google login in my ejected expo App as per doc it requires google-services.json file from firebase which I don't have. I already implement whole backend logic on my server so i just need successful token after login.
I also check expo-google-auth but after installation, it giving me an error that emulator not found(lib issue).
so how can I implement google login without Firebase.