radio4000 icon indicating copy to clipboard operation
radio4000 copied to clipboard

Clarify protected routes

Open oskarrough opened this issue 7 years ago • 0 comments

One thing I noticed refactoring #226 is, that we have a few different ways of authenticating in routes and I wasn't sure which to use when. Maybe we can clarify it and/or refactor if needed.

  • mixins/authenticated-route.js (beforeModel hook, transitions to login if not authenticated)
  • mixins/owner-route.js (afterModel hook, transitions to login if model!= userChannel
  • routes/user-channel.js (uses mixin/authenticated-route)
  • this.authenticatedRoute() (from torii, used in router.js. same as authenticated-route mixin?)

oskarrough avatar Jun 05 '18 17:06 oskarrough