Closed dse closed 3 years ago
@dse MSAL Browser is only intended to support client-side authentication flows. If you need the response to be available server side, you should use a server-side auth library, such as MSAL Node. Have you looked at our samples for MSAL Node?
Closing as answered.
Core Library
MSAL.js v2 (@azure/msal-browser)
Wrapper Library
Not Applicable
Description
Regarding #2228.
I'm working on a serverless web app that currently uses an AWS Lambda function as a redirect URI. It receives the Microsoft authentication tokens, validates them, generates an AWS STS token, and sends the STS token back to the browser. The browser then uses that token for subsequent calls to a different Lambda function. Right now we are using whatever they call the authentication method that involves URLs like
https://account.activedirectory.windowsazure.com/applications/signin/<clientId>?tenantId=<tenantId>
.My current mission is to switch to the Microsoft Graph API as per this tutorial.
Lambda functions are entirely server side, and do not have access to the fragment portion of the URL. (The
#bob
inhttps://example.com/#bob
) Unfortunately, when I specifyresponseMode: 'query'
,msal-browser
ignores it and will always redirect to<redirectUri>#<fragment>
.As workarounds, I can either set up a page that redirects to a URL with its fragment as the query string, or I can do some mad science JavaScript monkeypatching. A better solution would be nice.
Source
External (Customer)