You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been looking for documentation on how to configure redirect_uri for B2C but it seems to be missing.
There's the "CallbackPath": "/signin-oidc" but no RedirectUri is used in public client?
When you run the B2C app behind a proxy (like app service behind azure front door) the redirect URL needs to be configured for the proxy, not for the web app.
Redirect can be changed in code, but for other MSAL libraries that can be set in configuration.
Is this the intended way of handling this?
// Ensure correct redirect URI handling
options.Events.OnRedirectToIdentityProvider =async context =>{await parentHandler(context);varrequest= context.Request;varforwardedHost= request.Headers["X-Forwarded-Host"].FirstOrDefault();varforwardedProto= request.Headers["X-Forwarded-Proto"].FirstOrDefault();varscheme=forwardedProto?? request.Scheme;varhost=forwardedHost?? request.Host.Host;varport= request.Host.Port ??-1;varuriBuilder=new UriBuilder(scheme, host, port){Path= context.Options.CallbackPath.HasValue ? context.Options.CallbackPath.Value :"/signin-oidc",};varlogger= context.HttpContext.RequestServices.GetRequiredService<ILogger<MyApp>>(); logger.LogInformation("Redirecting to {redirectUri}", context.ProtocolMessage.RedirectUri); logger.LogInformation("AFD built URL would be: {redirectUri}", uriBuilder.Uri); context.ProtocolMessage.RedirectUri = uriBuilder.Uri.ToString();};});
The text was updated successfully, but these errors were encountered:
Documentation related to component
I've been looking for documentation on how to configure redirect_uri for B2C but it seems to be missing.
There's the
"CallbackPath": "/signin-oidc"
but noRedirectUri
is used in public client?microsoft-identity-web/src/Microsoft.Identity.Web.TokenAcquisition/AspNetCore/TokenAcquisitionAspnetCoreHost.cs
Line 127 in bf77c78
Please check all that apply
Description of the issue
When you run the B2C app behind a proxy (like app service behind azure front door) the redirect URL needs to be configured for the proxy, not for the web app.
Redirect can be changed in code, but for other MSAL libraries that can be set in configuration.
Is this the intended way of handling this?
The text was updated successfully, but these errors were encountered: