Category

Umbraco

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.

 

 

Comments

Post a comment

Fields marked with an * (asterisk) are required


Recent Posts

Tips & Tricks
How to use Cloudflare Workers and Transform Rul...

This post explains how to m...

News
UmbHost Limited is now a Silver Umbraco Partner

We are now officially a Sil...

Umbraco
How to pass a Content Security Nonce (CSP) to G...

How to use a CSP nonce with...

News
UmbCheckout 1.0.0 & UmbCheckout.StarterKit.Stri...

The stable version of UmbCh...

News
Voting is now open for the Green Business of th...

We've been shortlisted! - P...

ADVERTISTING
(Umbraco Hosting)

Umbraco Hosting Starting At €23/month