microsoft-authentication-library-for-js icon indicating copy to clipboard operation
microsoft-authentication-library-for-js copied to clipboard

Support for optional redirectURI path for the LoopBackClient

Open TGubbels opened this issue 5 months ago • 1 comments

Core Library

MSAL Node (@azure/msal-node)

Wrapper Library

MSAL Node Extensions (@azure/msal-node-extensions), Not Applicable

Public or Confidential Client?

Public

Description

It would be nice to have an optional parameter which can be passed to the acquireTokenInteractive method of the PublicClientApplication so that the redirect URI of the LoopBackClient can be changed with the addition of a path like: localhost:${port}/${path}.

This way, localhost can be registered in Azure Portal for the SPA platform for other purposes and Mobile and desktop application platform can be used for authentication purposes with the distinction of the path added to the redirect URI, so all ports can still be used for both registrations.

This can already be achieved with a custom LoopBackClient, but having it be officially supported would be a plus.

TGubbels avatar Jul 24 '25 07:07 TGubbels

Supporting this seems logical, Microsoft even mentions using the path in their own documentation: https://learn.microsoft.com/en-us/entra/identity-platform/reply-url#what-are-the-restrictions-of-redirect-uris-for-microsoft-entra-applications

JeroenBoesten avatar Jul 24 '25 10:07 JeroenBoesten