Reputation: 1143
I have an angular front end and laravel api backend and I want to allow users from my internal app to login using their microsoft details but I also want to use the laravel authentication functionality as well.
Should i be able to install the msal javascript library on my angular app, have the user go through the popup or redirect flow to get an access token, pass that token to my api and then the api can query the azure/graph api's using that token?
Upvotes: 1
Views: 1836
Reputation: 934
You should create the authentication functionality through laravel backend.
Msal javascript library is only for the Single Page Applications.
You can read about authentication flows with tutorials and code samples in MS docs: https://learn.microsoft.com/en-us/azure/active-directory/develop/v2-overview
Besides that, Laravel has two packages for Azure AD authentications: https://github.com/metrogistics/laravel-azure-ad-oauth - Extension of Socialite https://github.com/rootinc/laravel-azure-middleware - Based on middleware
There is a lot of information about how to work with MS Azure AD authentication on the https://laracasts.com/
Upvotes: 3