Issue while trying to protect routes!

Hello i followed docs in simple auth to how to protect routes, so only logged in users can view the link but am getting this error Screenshot 2021-07-18 at 15.33.37

Update: i just extended from authenticated class to the route i wanna protect and it looks like it works, is this the right way ?

That should work. I’m not 100% what the most current recommendations are but that definitely seems less problematic than nesting routes as you’d have to change all of your links. If you’re still curious about the first example and why it was broken it was because the “home” route was nested under “authenticated” route which means you would have needed to refer to the route as authenticated.home instead of just home.

1 Like

thank you! actually just started playing with ember last month and it looks neat!