question

VarunNatraaj-4598 avatar image
0 Votes"
VarunNatraaj-4598 asked vipulsparsh-MSFT answered

MSAL auth with web app and backend service

Hello,

We are in the process of building an application which has a Vue JS based web app that is powered by a Ruby on Rails backend. We have been looking into setting up oauth based sign up/sign in experiences and we have hit a little bit of a roadblock with MSAL 2.0 flows.

With other services, we're able to do this as a two step process:

  1. Users click sign in on the front-end. They're taken to the authorization URL, choose the account, grant permissions. This steps sends back the auth code to the front end app.

  2. The front-end app is then able to hit the callback URL in the back-end app (RoR) with the auth code which in turns gets the access tokens, refresh tokens, etc since it has the client secret with it.


So in this way, we're able to let users sign in with a provider, and are also able to store the tokens for access provider APIs for other integrations such as calendar, mail, etc.

Is there any way to do this with the MSAL 2.0 auth code flow because from what we've been seeing in the docs and trying, we are able to get the token directly in either front-end or back-end but not the hybrid flow that we've. Is there any way to go about doing this and do you have any suggestions?



azure-ad-msal
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

vipulsparsh-MSFT avatar image
0 Votes"
vipulsparsh-MSFT answered

@VarunNatraaj-4598 Thanks for reaching out and apologies for delay on this.

Let us know if following link helps you with your scenario
https://docs.microsoft.com/en-us/azure/active-directory/develop/tutorial-v2-nodejs-console

If you are still facing the problem, do let us know so that we can proceed accordingly.




If the suggested response helped you resolve your issue, please do not forget to accept the response as Answer and "Up-Vote" for the answer that helped you for benefit of the community.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.