auth redirectable module for ember-auth
Redirect for protected routes without a signed in session.
Config
App.Auth = EmAuthextend modules: 'authRedirectable' authRedirectable: # [string] route name to redirect to when accessing a protected route # without a signed in session route: null
Usage
# this route won't redirect App.PublicRoute = EmRouteextend # this route will redirect (unless signed in) App.ProtectedRoute = EmRouteextend authRedirectable: true
# call _super() and follow the promise pattern # if you override Ember.Route.beforeModel() App.FooRoute = EmberRouteextend : -> @_superapplythisargumentsthen -> doSomething # or : -> doSomething @_superapplythisarguments # already returns promise
License
MIT