You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the admin is logged in and refreshes the page he get's redirected to index because the currentUser is not loaded when the SuperProtectedRoute enters beforeModel().
How to fix this?
The text was updated successfully, but these errors were encountered:
Hm, that might work. I'm not sure I'm really comfortable with loading a model an user shouldn't have access to. I'll ditch deeper in this tomorrow and give some feedback. Thanks anyway, @ssulistyo!
I'm using
ember-simple-auth
for authentication. Wanted to protect admin-routes.Following the documentation, I have something like this:
User is loaded by the
SessionService
:If the admin is logged in and refreshes the page he get's redirected to
index
because thecurrentUser
is not loaded when theSuperProtectedRoute
entersbeforeModel()
.How to fix this?
The text was updated successfully, but these errors were encountered: