Skip to content

Commit fe1ee46

Browse files
authored
V14: Unique OAuth callback route (#16194)
* set the default for `AuthorizeCallbackPathName` to "/umbraco/oauth_complete" to allow the server to redirect the user back to a route where we don't load the entire backoffice. * remove redundant method
1 parent 2009989 commit fe1ee46

File tree

2 files changed

+1
-16
lines changed

2 files changed

+1
-16
lines changed

src/Umbraco.Core/Configuration/Models/SecuritySettings.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public class SecuritySettings
2525

2626
internal const int StaticMemberDefaultLockoutTimeInMinutes = 30 * 24 * 60;
2727
internal const int StaticUserDefaultLockoutTimeInMinutes = 30 * 24 * 60;
28-
internal const string StaticAuthorizeCallbackPathName = "/umbraco";
28+
internal const string StaticAuthorizeCallbackPathName = "/umbraco/oauth_complete";
2929
internal const string StaticAuthorizeCallbackLogoutPathName = "/umbraco/logout";
3030
internal const string StaticAuthorizeCallbackErrorPathName = "/umbraco/error";
3131

src/Umbraco.Web.Common/Helpers/OAuthOptionsHelper.cs

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -65,19 +65,4 @@ public T SetUmbracoRedirectWithFilteredParams<T>(T context, string providerFrien
6565
context.Response.Redirect(callbackPath);
6666
return context;
6767
}
68-
69-
/// <summary>
70-
/// Sets the callbackPath for the RemoteAuthenticationOptions based on the configured Umbraco path and the path supplied.
71-
/// By default this will result in "/umbraco/your-supplied-path".
72-
/// </summary>
73-
/// <param name="options">The options object to set the path on.</param>
74-
/// <param name="path">The path that should go after the umbraco path, will add a leading slash if it's missing.</param>
75-
/// <returns></returns>
76-
public RemoteAuthenticationOptions SetUmbracoBasedCallbackPath(RemoteAuthenticationOptions options, string path)
77-
{
78-
var umbracoCallbackPath = _securitySettings.Value.AuthorizeCallbackPathName;
79-
80-
options.CallbackPath = umbracoCallbackPath + path.EnsureStartsWith("/");
81-
return options;
82-
}
8368
}

0 commit comments

Comments
 (0)