Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decouple UI merging branch #1468

Merged
merged 12 commits into from
Oct 4, 2021
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public Task OnRemoteFailure(RemoteFailureContext context)
if (isOidcProtocolException && message.Contains(ErrorCodes.B2CForgottenPassword, StringComparison.OrdinalIgnoreCase))
{
// If the user clicked the reset password link, redirect to the reset password route
context.Response.Redirect($"{context.Request.PathBase}/MicrosoftIdentity/Account/ResetPassword/{SchemeName}");
context.Response.Redirect($"{context.Request.PathBase}{Options.ResetPasswordPath}/{SchemeName}");
}

// Access denied errors happen when a user cancels an action on the Azure Active Directory B2C UI. We just redirect back to
Expand All @@ -92,7 +92,7 @@ public Task OnRemoteFailure(RemoteFailureContext context)
{
_errorAccessor.SetMessage(context.HttpContext, message);

context.Response.Redirect($"{context.Request.PathBase}/MicrosoftIdentity/Account/Error");
context.Response.Redirect($"{context.Request.PathBase}{Options.ErrorPath}");
}

return Task.CompletedTask;
Expand Down
2 changes: 2 additions & 0 deletions src/Microsoft.Identity.Web/MergedOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ public ConfidentialClientApplicationOptions ConfidentialClientApplicationOptions

internal static void UpdateMergedOptionsFromMicrosoftIdentityOptions(MicrosoftIdentityOptions microsoftIdentityOptions, MergedOptions mergedOptions)
{
mergedOptions.ResetPasswordPath = microsoftIdentityOptions.ResetPasswordPath;
mergedOptions.ErrorPath = microsoftIdentityOptions.ErrorPath;
mergedOptions.AccessDeniedPath = microsoftIdentityOptions.AccessDeniedPath;
mergedOptions.AllowWebApiToBeAuthorizedByACL = microsoftIdentityOptions.AllowWebApiToBeAuthorizedByACL;
mergedOptions.AuthenticationMethod = microsoftIdentityOptions.AuthenticationMethod;
Expand Down
Loading