AuthFeature().ServiceRoutes - Option to hide route /Auth
Add a property to Remove the /Auth route, in favor of only /Authenticate instead.
Currently, I've added the following to hide /Auth routes.
// This is a way to remove the /Auth route and leave /Authorize instead. We don't need 2
ServiceRoutes = new Dictionary<Type, string[]> {{ typeof(AuthenticateService), new[] { "/" + localize(LocalizedStrings.Authenticate), "/" + localize(LocalizedStrings.Authenticate) + "/{provider}" }}},
Maybe there is a better way? Or is this bad?
1
vote

Like most plugins you can configure them when registering them, you can change it to only host Authenticate Services on `/authenticate` route with:
var authFeature = new AuthFeature(…);
authFeature.ServiceRoutes[typeof (AuthenticateService)] = new[] {
“/authenticate”,
“/authenticate/{provider}”,
};
Plugins.Add(authFeature);
-
JJ commented
thanks.
-
Bruce Hunter commented
The default would obviously be to show this route for backwards compatibility.