This commit is contained in:
parent
3020264ec7
commit
5c7c621895
|
|
@ -1,4 +1,4 @@
|
||||||
// Copyright (c) .NET Foundation. All rights reserved.
|
// Copyright (c) .NET Foundation. All rights reserved.
|
||||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.using Microsoft.AspNetCore.Authorization;
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.using Microsoft.AspNetCore.Authorization;
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
|
@ -65,7 +65,7 @@ namespace Microsoft.AspNetCore.Authentication.AzureADB2C.UI
|
||||||
if (context.Failure is OpenIdConnectProtocolException && context.Failure.Message.Contains("AADB2C90118"))
|
if (context.Failure is OpenIdConnectProtocolException && context.Failure.Message.Contains("AADB2C90118"))
|
||||||
{
|
{
|
||||||
// If the user clicked the reset password link, redirect to the reset password route
|
// If the user clicked the reset password link, redirect to the reset password route
|
||||||
context.Response.Redirect($"/AzureADB2C/Account/ResetPassword/{SchemeName}");
|
context.Response.Redirect($"{context.Request.PathBase}/AzureADB2C/Account/ResetPassword/{SchemeName}");
|
||||||
}
|
}
|
||||||
// Access denied errors happen when a user cancels an action on the Azure Active Directory B2C UI. We just redirect back to
|
// Access denied errors happen when a user cancels an action on the Azure Active Directory B2C UI. We just redirect back to
|
||||||
// the main page in that case.
|
// the main page in that case.
|
||||||
|
|
@ -75,11 +75,11 @@ namespace Microsoft.AspNetCore.Authentication.AzureADB2C.UI
|
||||||
// ', error_uri: 'error_uri is null'.
|
// ', error_uri: 'error_uri is null'.
|
||||||
else if (context.Failure is OpenIdConnectProtocolException && context.Failure.Message.Contains("access_denied"))
|
else if (context.Failure is OpenIdConnectProtocolException && context.Failure.Message.Contains("access_denied"))
|
||||||
{
|
{
|
||||||
context.Response.Redirect("/");
|
context.Response.Redirect($"{context.Request.PathBase}/");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
context.Response.Redirect("/AzureADB2C/Account/Error");
|
context.Response.Redirect($"{context.Request.PathBase}/AzureADB2C/Account/Error");
|
||||||
}
|
}
|
||||||
|
|
||||||
return Task.CompletedTask;
|
return Task.CompletedTask;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue