'Azure AD integrate with frontend React and backend GoLang

I have a separate structure for backend using GoLang Gin and frontend ReactJS and would like to integrate the Azure AD Oauth2 login.

However, it's ok to authenticate GoLang App or React App, but how to pass the auth info to the backend when I authenticate in frontend using msal-react?

In my current backend API, I use JWT like this to protect APIs: v1.Use(jwtauth.JWTAuth())

or should I authenticate the backend and pass the info to frontend? but I cannot get it to redirect(Azure login) since they are in different port...

Thanks!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source