Hey, toddle community. I'm currently working on setting up magic link auth via Supabase using the API but struggling to set the session cookies.
Obviously, until you use the magic link, you're not authenticated, so I need a way of setting the session cookie before I redirect the user to the homepage. The URL contains the access token, so am I retrieving it from there?
I have the hacky auth check in a component on the homepage to ensure that if the user is not authenticated then they're redirected to the login page but I'm not sure when (and the best way) to grab the access token. When using email and password, you're setting it as soon as you do the login API call but that's not the case for magic link.