How can I add Microsoft authentication to my react native app? - react-native

I have a React-Native application in development that is an extension of a current web application. The web application makes use of MSAL to authenticate the users and I want to do this as well with the mobile app.
I have not really managed to find anything relevant, and what I have found was out of date or for the ReactJS framework.
I have been trying to make use of the MSAL-react-native component however it isn't that well documented so I'm lost over there as well

Use react-native-msal for Microsoft authentication

Enable authentication in your own React Application by using Azure Active Directory B2C:
For more information please check: https://learn.microsoft.com/en-us/azure/active-directory-b2c/enable-authentication-react-spa-app

Related

How can I setup sign in as Google account on a react native + asp core web api and Identity server as middleware

How can I configure my mobile app project to sign in using external providers (Google). I am using react native + web api core. Most examples using google sign in is using ASP.Net Web application not web Api. I am using also Identity server as middleware
IDS4 still requires a serverside UI (although you could in theory use whatever client side framework you wish) so to keep things simple I'd wire the Google sign into your existing sign in UI flow.
For a native app it's strongly recommended that you use the authorization code flow with PKCE and use ASWebAuthenticationSession or custom tabs for iOS and Android respectively.

Has anyone successfully implemented Azure AD auth using Server Side Rendering Angular (Angular Universal)?

Currently We have an app that is using Angular Universal for Rendering. We have MSAL auth installed but we get random infinite loops with auth, especially new users.
We have tried catching these events and handling them but it does not seem to work. Looked at some documentation that says, MSAL is still not supported with Node and Server Side Apps.
I cannot use AUTH0. Does anyone have any ideas on how to accomplish the auth against azure ad in this type of app?
MSAL.js at the moment works only with single page applications. Support for Node applications is on the roadmap.
Still, there are a number of 3rd party libraries that you can use for this. I would suggest using passport-azure-ad. You can see a sample application here.

Shoutem - How does it work for custom backend/integrations?

Interested to learn more about the product. The frontend seems very straightforward. What I'm curious about is how much "backend" services your tools supply? For features that you run the backend for, is there API access?
This is the use case I'm trying to understand. If we were to sign up as an agency, would we be able to 1) create an app with your system 2) add custom features/native modules/etc and 3) connect that app to a custom dashboard which we run ourselves
From the backend services, Shoutem has its own Cloud Storage to manage your data in the app and Automated app publishing tool for publishing your app to both stores. You can customize Shoutem Cloud with your data models.
To answer other questions:
Yes, everyone can create their app on Shoutem.
Shoutem is just an architecture on how to create React Native apps. Apps are divided into smaller building blocks, called extensions. This architecture enables developers to reuse extensions in multiple apps which leads to more efficient app development process. You can build your custom extension and that extension can use any feature from React Native,
including native functionalities. We made sure not to restrict you on how you can use React Native.
Our extensions are by default connected with Shoutem CMS. Since they are open sourced, you can customize them to use your own backend instead. For your own extensions, you chose which dashboard they are going to use.
Extensions are built from 2 parts: app part and server part. App part represents application logic, while server part allows the customization of Shoutem Server including Dashboard and CMS. For Dashboard, you can write Settings pages which can be hosted anywhere, including on your own backend.
All the underlying concepts are explained on Shoutem's Developer portal: shoutem.github.io

LDAP Authentication for Native API in MobileFirst Platform Foundation

I am looking for reference and tutorial of MobileFirst Platform Foundation provided LDAP authentication.
AFAIK and as far as I can get from sources out there, MFPF provides LDAP auth for hybrid app only as can be read from here.
I followed this tutorial to create native API and import all MFPF jar into native project and tried to import com.worklightcore.auth.ext.ldapLoginModule as seen from example code in hybrid below, but can't.
Does Worklight supports LDAP auth for native?
Tried to import it where? What exactly did you try to import?
This is all server-side, so while the sample project contains a Hybrid application - the LDAP part is a server-side component (as it is defined in the authenticationConfig.xml file) and is valid for native apps as well.
Be it Hybrid or Native, both would communicate with the server via an adapter.
Be it Hybrid or Native, the adapter and any server-side configuration, including LDAP, is done in the MobileFirst project in Eclipse, and not in the native project (Xcode, Android Studio and so on).
You will need to better illustrate what you have done.
Even better, provide your native project for later debugging.
You can also take the LDAP sample project and keep it as-is.
Only add a NativeAPI, copy over the SDK files into your native project and implement in the native app the same client-side code done in the Hybrid app (adapter calls, logic, if there's a challenge handler then that as well).

Azure Active directory authentication with PCL Xamarin forms

Iam trying to create a cress platform mobile app using Xamarin forms. I am using an azure mobile service and have to authenticate to the Azure active directory. I have previously done this with Xamarin.Android. But I am not sure how to do this with PCL. I ahve already created a Mobile service and Active directory on Azure portal.
If anyone can guide me on how to go forward with this or provide me with any example it would be very helpful.Thanks.
ADAL v3.x preview does not yet support Xamarin.Forms. We are looking into it, but for the time being the preview available today needs iOS/Android/Win specific projects.
There is ADAL support for PCL to authenticate to AAD:
http://www.cloudidentity.com/blog/2014/10/30/adal-net-v3-preview-pcl-xamarin-support/