👋 @frail carbon so like i was getting at on twitter, I've been trying to figure out the right way to go about setting up auth with the router when doing something like the below. The example in the docs was fairly static, so was trying to figure out a larger solution. I've tried various things with beforeLoad and with context, but haven't been able to nail it down.
I've reeled back the below to a simple base that works, but needs to be cleaned up to a proper setup. Any thoughts on a best approach here? I'm fine redirecting to that login path when a route is unauthorized or a login page i can pretty up -- either works for me.
Happy to provide more code, it's just hard to get something fully running on code sandbox since i'm using an IDP in docker for the auth.
https://gist.github.com/pdevito3/190bff13bdf237fd285ec02735c03b6b