1
votes

I have written several web applications in Angular that use Auth0 to authenticate users. However, although we are using Auth0, we are integrating Auth0 with Azure AD. So users are prompted by an Auth0 hosted login page where they are directed to login via their Azure AD credentials and then Auth0 redirects them back to our client application with the Auth0 access token.

I am now creating a NativeScript application using Angular for the first time and am curious how to achieve user authentication in a similar manner. As of right now, there is direct support from Auth0 for NativeScript. I would try to use straight up username-password authentication with Auth0, but the issue is that the password is stored at Azure AD, so I don't think it will work like that.

I could potentially authenticate users to Azure AD using username/password but right now all of my backend routes are expecting an Auth0 access token, not an Azure AD access token. Also, the last time I tried to work with the adal.js library there were many issues.

I'm also very cautious about using libraries random people have created that do not look supported by many users.

Does anyone have any experience authenticating users via Auth0 or Azure AD with a NativeScript app?

1
Doesn't directly answer your question, but this OS OAuth2 library integrates directly with Azure AD + Microsoft Graph API (documented as Office365 accounts) and has a sample of how to do so. As an upside, if you integrate directly, it's completely free. - Daniel Dobalian

1 Answers

0
votes

Did you check the Nativescript plugin for auth0.