The login functionality is fully implemented in our theme helping you to start your project in no time. To login into dashboard you just have to add /login in the URL and fill the login form with one of the credentials (user: [email protected] , [email protected] , [email protected] and password:secret ).
The src\views\Login.vue
is the Vue component which handles the login functinality. You can easily adapt it to your needs.
It uses the auth store located in src\store\auth.module.js
.
Login Examples Copy
1 < div class = " card z-index-0 fadeIn3 fadeInBottom" >
2 < div class = " card-header p-0 position-relative mt-n4 mx-3 z-index-2" >
3 < div class = " bg-gradient-success shadow-success border-radius-lg py-3 pe-1" >
4 < h4 class = " text-white font-weight-bolder text-center mt-2 mb-0" >
5 Sign in
6 </ h4>
7 < div class = " row mt-3" >
8 < div class = " col-2 text-center ms-auto" >
9 < a class = " btn btn-link px-3" href = " javascript:;" >
10 < i class = " fab fa-facebook text-white text-lg" > </ i>
11 </ a>
12 </ div>
13 < div class = " col-2 text-center px-1" >
14 < a class = " btn btn-link px-3" href = " javascript:;" >
15 < i class = " fab fa-github text-white text-lg" > </ i>
16 </ a>
17 </ div>
18 < div class = " col-2 text-center me-auto" >
19 < a class = " btn btn-link px-3" href = " javascript:;" >
20 < i class = " fab fa-google text-white text-lg" > </ i>
21 </ a>
22 </ div>
23 </ div>
24 </ div>
25 </ div>
26 < div class = " card-body" >
27 < Form role= "form" class = "text-start mt-3" : validation- schema= "schema" @submit= "handleLogin"
28 @invalid- submit= "badSubmit" >
29 < div class = " mb-3" >
30 < material-input-field id = " email" v-model: value= " user.email" type = " email"
31 label = " Email" name = " email" />
32 </ div>
33 < div class = " mb-3" >
34 < material-input-field id = " password" v-model: value= " user.password" type = " password"
35 label = " Password" name = " password" />
36 </ div>
37 < material-switch id = " rememberMe" name = " Remember Me" > Remember me</ material-switch>
38 < div class = " text-center" >
39 < material-button class = " my-4 mb-2" variant = " gradient" color = " success" full-width >
40 < span> Sign in </ span>
41 </ material-button>
42 </ div>
43 < p class = " mt-4 text-sm text-center" >
44 Don't have an account?
45 < router-link :to = " { name: ' Signup' }"
46 class = " text-success text-gradient font-weight-bold" > Sign
47 up</ router-link>
48 </ p>
49 < p class = " text-sm text-center" >
50 < router-link :to = " { name: ' PasswordForgot' }"
51 class = " text-success text-gradient font-weight-bold" > Recover
52 Password</ router-link>
53 </ p>
54 </ Form >
55 </ div>
56 </ div>