In this post I will show you how to create a simple login form with logout link in Umbraco V9 (RC)
1. Create a partial view called _Login
2. Create a partial view called _Logout
3. Create a member authentication controller called MemberAuthenticationSurfaceController.cs
4. Create the View Components MemberLoginViewComponent.cs and MemberLogoutViewComponent.cs
5. Create login template
Next we can follow the instructions from Paul Seal (codeshare.co.uk) as the backoffice part of the process has not changed.
5. Create a login document type and assign the login template to it. You don't need to add any properties to the document type
6. Allow the home page to have the login document type as a child node.
7. Create a member in the members section if you don't have one already.
8. Create the login page in the content content tree underneath the home node.
9. Build and run the site, go to the login page, you can now login with the member details for the member you created previously.
If you need help with this please reach out, if you find it useful or have any improvements let me know in the comments below.
How to use a CSP nonce with...
The stable version of UmbCh...
We've been shortlisted! - P...
We have been shortlisted fo...
If you believe in what we d...
Umbraco Hosting Starting At $26/month