React Native - React-native-app-auth - service_configuration_fetch_error - react-native

Environment
Your Identity Provider: Azure
Platform that you're experiencing the issue on: Android
Are you using Expo?: No
React Native Version: 0.66.4
React Native App Auth Version: 6.4.0
Hi Folks,
My app is being used by about 300 users and we are getting a lot of complaints about problems logging into Microsoft using MFA.
After receiving the SMS and adding the code, the user confirms on the consent screen to be redirected back to the app but often he goes back to the Microsoft Login page.
The problem can be solved palliatively by clearing the cache of the Chrome app.
I put some logs on my AppCenter:
Below is what my code looks like:
And my Azure Url Redirect configuration on App Register:
Question:
I need to put on property appAuthRedirectScheme the same name of my bundleId? Or can I put any custom string?
And
What could be the problem on service_configuration_fetch_error?

Related

React Native: Cognito federated auth issue on Android TV

AWS Cognito Federated sign in with Google setup correctly and it works perfectly on Android devices (phones, tablets). But on Android TV Web Browsers can't redirect to custom url scheme (web browsers don't understand that the app should be opened). The error says "can't open scheme myapp://oauth/?iod=..." with the error code Net::ERR_UNKNOWN_URL_SCHEME.
React Native version is 0.66, with not the latest aws-amplify, but the issue mainly related to the behavior that browser doesn't open the app with custom url scheme.
Does anybody encountered such an issue and if yes, then what solution could be here?
Appreciate your help.
I've tried to use redirectSignIn url as App link instead of custom url scheme, but that didn't work (when you open app link from another app android opens proper app, but if redirecting/opening within the browser, then it redirects to the web page).

React Native Expo AuthSession; Google Authentication

I’m trying to setup the Google authentication using AuthSession in Expo documentation (without Firebase)
https://docs.expo.dev/guides/authentication/#google
The first problem is, that the slack example doesn’t work: on the devices and simulators nothing happen after pushing the button, and in web mode it returns an error
Error 401: invalid_client
The OAuth client was not found.
What I’ve done using steps in documentation:
I’m not sure if it’s necessary, but I’ve installed yarn add expo-application
I’ve registered in Credentials page (Google Cloud Platform)
Logged in using expo login, in the terminal where I was starting expo start
Created a new Google Client ID that will be used with expoClientId
(Image) New Google Client ID setting image
( I'm not allowed to input images now )
(Don’t know if it’s necessary) I’ve created a project in https://expo.dev/ and then published the project using dashboard of expo start
(Image) Setting for "publish" in expo start dashboard
Where:
“expo”: {
“name”: “rn-my-project”,
“slug”: “rn-my-project”,
“version”: “1.0.0”,
“orientation”: “portrait”,
…
}
Using the code in the example, provided in documentation for Google, I receive null as response.
As I understand, this should be enough to test the Google Authentication using AuthSession in Expo Go app. I also made iosClientId, androidClientId and webClientId, but I’m not sure if I made everything correct.
Will be glad for any help, because I couldn’t find any person with the problem as mine.
Yours sincerely.
P.S. I've successfully set up logInAsync for Google using this documentation, but it's written, that it is deprecated.

Auth0 unauthorized_client: Callback URL mismatch error in new React Native app

I've created a new React Native app that will use the same Auth0 database as my web app.
I created the app in Auth0 portal and created all the necessary settings following this article: https://auth0.com/docs/quickstart/native/react-native/00-login
Even though the callback URL is listed in Auth0 portal, after a log in attempt, I'm getting the following error:
error = unauthorized_client: Callback URL mismatch.
com.ingridtime://ingrid.auth0.com/android/com.ingridtime/callback
is not in the list
Here's the actual callback list from the Auth0 portal:
I'm using the latest versions of both React Native and Auth0 packages. Here's a screen shot of my package.json dependencies section:
Any idea what the issue here is?
Figured it out. The issue was with the custom login screen we had created which had another app's ID hard-coded in it.

React Native expo-facebook: Error ‘Given URL is not allowed by the Application Configuration.’

I’m trying to get Facebook Login working using the expo-facebook package (I'm using the Managed Workflow)
I created my application in the Facebook Developer Console and copied the “App ID”.
This is the code I'm using inside my React Native Expo app:
async facebookLogin() {
await Facebook.initializeAsync('26327628297297')
const response = await Facebook.logInWithReadPermissionsAsync({ permissions: ['public_profile']})
console.log(response)
}
My understanding is that while using the Expo Client App there is no need to do any extra configuration because it will be using Expo’s Facebook App ID for all API calls.
The problem is that after logging in I get this error message:
Given URL is not allowed by the Application configuration: One or more of the given URLs is not allowed by the App’s settings. To use this URL you must add a valid native platform in your App’s settings.
I also tried added “facebookScheme” to my app.json but that didnt seem to help:
"facebookScheme": "fb26327628297297",
Thanks for your time!
Actually you just have to add platform in your app settings
So here are the steps
Open https://developers.facebook.com and select your app
Settings > Basic > Add Platform
use host.expo.Exponent as bundle id
3.Now select iOS from the window and add your Bundle ID and rest of the information and click on Save changes
and that's it.
Hope it helps you .. All the best

Expo Android App Build Stuck on Axios Request

I have built this pizza app in which the home screen loads data that it received using axios get request. When I use the app on the development mode i.e. running expo client on my phone and scanning the QR code, the app loads pizza cards with no issues. (PS there is a loading screen before the pizza cards render). But when I ran expo build:android and got the standalone app (apk file). I installed it on my phone and the home screen is stuck on the loading sign. It is not fetching any data from the backend API, can anyone help me with this issue.
In my case the error is that I was registering for expo notification and calling the api only after the promise resolved (I forgot to provide FCM api key)
for eg:-
registerForPushNotificationsAsync().then(token => {
//--- calling the login api ---
}
since expo notification will not work in production build if we dont provide FCM key thats why login api was not getting called in production so my request was working in development but not in production