When is the user logged in when using magic links?

Until now the auth has been working very well, but a recent refactor seems to have broken everything and I can't figure out why.

We are using magic links to sign in users, but after clicking the magic link the user is not signed in. There is no event pushed to auth.onAuthStateChange, auth.user() remains null and policies that require authenticated users fail. Observing the requests after clicking the magic link reveals that http-only cookies for authentication are set, when following the verify-link. I've made sure that the redirect is for the correct domain, so that shouldn't be an issue.

My question is, as the title states, when the user is considered to have logged in? I assumed it would be when the url of the magic link is navigated to, but given that supabase does not recognize the 'SIGNED_IN' event that doesn't seem to be right.

Also, is there a way to check a user's auth state in the dashboard? That might help us debug a little.
Was this page helpful?