I am having trouble following SimpLabs' starting guide for ember-simple-auth.
Following the guides on the home page, word for word, does not work.
When I test my login form, the "authenticate" action goes up to the controller and errors.
Stack:
TypeError: Cannot read property 'authenticate' of undefined
at http://local-03-02-xx.lariatcentral.net/assets/vendor.js:61403:48
at invokeResolver (http://local-03-02-xx.lariatcentral.net/assets/vendor.js:23342:9)
at new Promise (http://local-03-02-xx.lariatcentral.net/assets/vendor.js:23328:9)
at __exports__.default.Ember.ObjectProxy.extend.authenticate (http://local-03-02-xx.lariatcentral.net/assets/vendor.js:61402:16)
at __exports__.default.Ember.Mixin.create.actions.authenticate (http://local-03-02-xx.lariatcentral.net/assets/vendor.js:61176:62)
at apply (http://local-03-02-xx.lariatcentral.net/assets/vendor.js:21143:27)
at superFunction [as _super] (http://local-03-02-xx.lariatcentral.net/assets/vendor.js:17841:15)
at __exports__.default.Ember.Mixin.create.actions.authenticate (http://local-03-02-xx.lariatcentral.net/assets/vendor.js:61234:23)
at apply (http://local-03-02-xx.lariatcentral.net/assets/vendor.js:21141:32)
at superWrapper (http://local-03-02-xx.lariatcentral.net/assets/vendor.js:20721:15)
Code
app/routes/application.js
import ApplicationRouteMixin from 'simple-auth/mixins/application-route-mixin';
export default Ember.Route.extend(ApplicationRouteMixin);
app/controller/login.js
import Ember from 'ember';
import LoginControllerMixin from 'simple-auth/mixins/login-controller-mixin';
export default Ember.Controller.extend(LoginControllerMixin, {
authenticator: 'authenticator:custom'
});
app/templates/login.hbs
<form {{action authenticate on='submit'}}>
<div>
<label for="identification">
<span class="sr-only">Login:</span>
<div class="input-group">
<span class="input-group-addon"><span class=" glyphicon glyphicon-user"></span></span>
{{input type="text" value=identification id="identification" class="form-control" placeholder="Login"}}
</div>
</label>
</div>
<div>
<label for="password">
<span class="sr-only">Password:</span>
<div class="input-group">
<span class="input-group-addon"><span class="glyphicon glyphicon-lock"></span></span>
{{input type="password" value=password id="password" class="form-control" placeholder="Password"}}
</div>
</label>
</div>
<button type="submit" class="btn btn-block action-sm">Login</button>
</form>
Is there an extra step that the website forgot to mention? I feel like I have checked and rechecked everything...