setup base jwt authentication
This commit is contained in:
@@ -1,7 +1,12 @@
|
||||
{{page-title "Holygamesapp"}}
|
||||
|
||||
{{outlet}}
|
||||
|
||||
{{! The following component displays Ember's default welcome message. }}
|
||||
<WelcomePage />
|
||||
{{! Feel free to remove this! }}
|
||||
<div class="menu">
|
||||
{{#if this.session.isAuthenticated}}
|
||||
<button type="button" {{on "click" this.invalidateSession}}>Logout</button>
|
||||
{{else}}
|
||||
<LinkTo @route="login">Login</LinkTo>
|
||||
{{/if}}
|
||||
</div>
|
||||
<div class="main">
|
||||
{{outlet}}
|
||||
</div>
|
||||
|
||||
10
app/templates/login.hbs
Normal file
10
app/templates/login.hbs
Normal file
@@ -0,0 +1,10 @@
|
||||
<form {{on "submit" this.authenticate}}>
|
||||
<label for="identification">Login</label>
|
||||
<input id='identification' placeholder="Enter Login" value={{this.identification}} {{on "change" this.updateIdentification}}>
|
||||
<label for="password">Password</label>
|
||||
<input id='password' placeholder="Enter Password" value={{this.password}} {{on "change" this.updatePassword}}>
|
||||
<button type="submit">Login</button>
|
||||
{{#if this.errorMessage}}
|
||||
<p>{{this.errorMessage}}</p>
|
||||
{{/if}}
|
||||
</form>
|
||||
Reference in New Issue
Block a user