Redirect Uri is not working in react native for msal - react-native

I have a react-native app in which I am trying to move to msal from adal using the react-native-app-auth library in which finally after authentication I am getting this window that "Only continue if you downloaded the app from a store or website you trust", as clicking any button does not work, I found one issue related (Desktop app + Microsoft Authentication Error) but there is also no solution provided there too and I have tried with the HTTP:// URLs too.
So, did any one of you faced the same issue, so please help in the resolution. The final window I am getting

According to your follow-up comment I notice that you are facing redirect URL issue. In Redirect URI, select Web and type /.auth/login/aad/callback.
For example:https://contoso.azurewebsites.net/.auth/login/aad/callback.
Follow these steps and ensure all steps are followed.
https://learn.microsoft.com/en-us/azure/app-service/configure-authentication-provider-aad#-create-an-app-registration-in-azure-ad-for-your-app-service-app
Enable Azure active directory in you App Service app.
https://learn.microsoft.com/en-us/azure/app-service/configure-authentication-provider-aad#-enable-azure-active-directory-in-your-app-service-app

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).

How do I create a http redirect url for react native expo app?

I have a third-party OAuth in my react-native expo app.
I need to specify a https redirect url to the third party website to come back to my app. Right now when I am running my app on expo - I am using auth.expo to redirect to the app and it works fine.
Now, when I want to run it as an independent app, how should I set up redirection in it?
I have searched a lot for it and the solutions that I have found said to modify the AndroidManifest file which is not there in app created via expo.
Can you please guide on how should I proceed?

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.

How to implement Google authentication using Xamarin.Forms?

I am developing a login feature in that user can login into the application using the Google account and get user profile detail. For that, I am creating a project in google developers and it's verified by me.
I try with this reference here but when I try with this that is give me the error of "Disallowed user agent" and gives me the error of the open in safari or chrome when I try with the iPhone(iOS devices).
I also go through some other references like "Xamarin. Auth" but it doesn't work for me. When I set a redirection URL with clientId:/oauth2redirect or the Package Name(Bundle Identifier):/oauth2redirect . It gives me an exception of Not valid redirect Uri.
I also try to add JSON and p12 file on respective device-specific projects and set bundle resource but it doesn't work me.
If anyone has solution to this without using WebView than help me.
You can try this plugin from CroosGeeks
https://github.com/CrossGeeks/GoogleClientPlugin
Here is the sample app:
https://github.com/CrossGeeks/GoogleClientPlugin/tree/master/GoogleClient/GoogleClientSample
This is not using the WebView. The documentation is also quite good.

NoCommerce 3.80 External Login Plugins

I am new to NopCommerce as well as C# MVC. I am working on NopCommerce 3.80.
As per Instructions I downloaded Google+ Plugin from NopCommerce Official site and Installed it and also configured it.
But when i click on Login with google button, it shows an error of
Google OAuth 2 authorization - Error: redirect_uri_mismatch
Can anybody help me to solve this ?
And another Question is do I have to create a Class Library for the External Authentication as like Facebook(Inbuilt Plugin) ??
The redirect URI that you entered in Google developer console must exactly match the location you are trying to authenticate from this includes the port number I can see in your message.
I don't know enough about nop to tell you if you could use the Google .net client library for your application.
I got the solution.
I haven't given correct callback URL that's why it's showing redirect_uri_mismatch error.
the URL I added is
"localhost:15536/plugins/externalauthGoogle/logincallback/"