Identity URLs are all of the form : /Identity/Account/Login
How can I change them (all) to be of the form myapp/Identity/Account/Login ?
Is there a single "base" property or setter ?
Thanks for contacting us, @kofifus.
@javiercn, @HaoK is there such a property?
There is no such property, you could achieve something like that by mapping MVC inside a base path. But that might have unforeseen issues. Paths are generally not configurable due to the fact that Identity UI uses MVC areas to separate itself from the rest of the app.
app.Map("/myapp", myApp => {
...
myApp.UseMvc();
}
Thanks @javiercn !
Perhaps I should explain my scenario a bit further as I imagine it is quite common -
My server (asp.net core Indentity as UI + SignalR) is deployed using kestrel on http://localhost:5000
I have the 'real' web server port-forward https connections on port 80 to the kestrel port.
The 'real' server also serves other apps/pages etc, so I need some way of distinguishing my app for the forwarding to happen, just to forward any request of https://server/Identity/* to http://localhost:5000/Identity/* feels very awkward, not to mention will not work if there are two separate apps using Identity.
What is the best way to handle such situations ?
If you are serving multiple sites on the same host the only viable option is to use base paths, and I believe they all must be served from the same server as only one server can take over the port at a given time.
If you have subdomains you could potentially use that instead, so site1.domain.com site2.domain.com and so on, but I'm just speculating here.
The way this is typically done in IIS is through the use of virtual folders, where you have multiple independent sites listening on the same host and the traffic gets redirected based on the name of the folder, for example domain.com/site1 and domain.com/site2.
site1 and site2 become base paths in your app and you don't need to think about them, so in your case Identity would end up in domain.com/site1/Identity...