Supabase is pretty amazing at databasey things, but I struggle a bit with common auth-like patterns even after the recent updates
For example, many example repos are set up so that you stay on the same page you logged in on, but show different content once the user object is full.
I'd like to identify the user server-side and redirect them to a different page/route on success. It seems that between Next.js and the updated Auth Helpers, this isn't a possible thing.
getUserByCookie doesn't work and supabaseClient.auth.session() returns an access_token which, if nothing else, at least lets me know there's a real or non-logged-out person, to use as a conditional to force a redirect.
But the redirects away to the destination implode, presumably because the destination page is guarded from logged-out users and redirects back to the same place they just came from -- as if the destination page didn't know who they were.
I cannot find a simple, basic working example of this, and can find five or six GitHub threads talking about it or around it, so I feel like I'd just muddy the waters to add another one.
Is there some inherent aspect to node/React/Next/Supabase that prevents it?