I have forms authentication wired up for my MVC 3 application. Normally when a request comes in that requires authentication, they are taken to my Login controller where they have to login.
However, I want a different view for this specific workflow because I plan on utilizing white labeling for my clients. Instead, I want them to go to a different endpoint in my Login controller to display my custom login view.
What options do I have to make this work?
Can you elaborate on what you mean by white-label? What content will be changed and what will it depend on?
In your Web.config
file look for
<system.web>
<authentication mode="Forms">
<forms loginUrl="/Login/Index" />
</authentication>
Change the loginUrl
attribute to what you want it to be. Then, on the login action, select the proper view to return.
You'll need some type of identifier to distinguish clients (subdomain, cookie or something). Use that to select the proper view to return.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With