I use Ember simple auth in my application and it works fine, but I came across a script that I have problems around.
The library allows you to specify the route to redirect after successful authentication by overriding routeAfterAuthentication: 'index' . This works fine, however, I am in a situation where I want to have two different types of redirects. When the user first logs in, I want them to go to /dashboard , but when they first log in and authenticate, I want them to go /settings .
I was hoping I could do something like this after successfully creating the account, but still trying to use the routeAfterAuthentication option to navigate:
var _this = this; this.set('identification', _this.get('email')); this.set('password', password); this.send('authenticate', function() { _this.transitionToRoute('settings'); }, function() {});
Is there a way to indicate which route to go after authentication on a one-time basis? Maybe there is a better way to register someone after creating an account without going through the authenticate() method?
source share