Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify protected routes #227

Open
oskarrough opened this issue Jun 5, 2018 · 0 comments
Open

Clarify protected routes #227

oskarrough opened this issue Jun 5, 2018 · 0 comments

Comments

@oskarrough
Copy link
Member

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?)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant