If user was trying to visit a /protected-route
, then using ember-simple-auth
after user authentication finished on /login
route, how to redirect user back to the /protected-route
?
There is configuration to define the route after authentication but how to accomplish something like this?
You should mixin the ApplicationRouteMixin
into the application route and the user will transition to protected route
after login.
For more info see ApplicationRouteMixin
docs at http://ember-simple-auth.com/api/classes/ApplicationRouteMixin.html and the sessionAuthenticated
method
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.