ember-simple-auth
ember-simple-auth copied to clipboard
is it possible to disable routeAfterAuthentication?
For scenarios where login is handled via a modal, there is often no need to transition to a different page after authenticating. Rather than it would be beneficial to be able to continue the action which triggered to need to be authenticated (for instance, when button is clicked, show login modal, if authentication succeeds, continue to the form).
While I am not quite sure what would be the best option to solve the second part, it would be helpful if there would be a way to disable transitioning to a different route after authentication succeeds.
I am currently working around this by using a computed property that is named routeAfterAuthentication
, which I just set to the current route if I would like to disable the redirect. However, a more clean solution to solve this would probably be beneficial in a quite some cases.
You can override the handleAuthentication method of the Session service. If you don't call super, you'll avoid the redirection done there.