Exercise: Securing Routes
There some urls that don't make sense when the user is not logged in (e.g. /repo/:owner/:name)
Suggest the easiest solution.
A helper function that would check authorisation in the router:
// **** router.js ****
...
routes : {
...
'repo/:owner/:name': requiresAuth('repoDetail'),
...
}
This is the concept. The challenge is to implement the requiresAuth function.