how do I get a session after confirming a user's email?
Hey, I'm kind of lost looking at the auth / swift docs.
I'm calling supabase.auth.signUp(email: email, password: password, redirectTo: redirectUrl), and clicking the link in the email sent to the user redirects to my app URL with the query parameter code=<some UUID>.
From looking at the docs, the signUp method doesn't return a session when confirm email is enabled, and sure enough I get an null session error later in my flow after the user is redirected to my app.
It's unclear from the docs what I'm supposed to do with the code sent in the redirect URL. I thought I was doing Implicit flow, but the PKCE docs mention just receiving a code parameter in the redirect URL.
I saw PKCE docs mention supabase.auth.exchangeCodeForSession(authCode: ). I'm guessing I should pass the code in the URL to that, but it's unclear what I'm supposed to do with the Session returned by this method.
any advice would be greatly appreciated. thanks!
I'm calling supabase.auth.signUp(email: email, password: password, redirectTo: redirectUrl), and clicking the link in the email sent to the user redirects to my app URL with the query parameter code=<some UUID>.
From looking at the docs, the signUp method doesn't return a session when confirm email is enabled, and sure enough I get an null session error later in my flow after the user is redirected to my app.
It's unclear from the docs what I'm supposed to do with the code sent in the redirect URL. I thought I was doing Implicit flow, but the PKCE docs mention just receiving a code parameter in the redirect URL.
I saw PKCE docs mention supabase.auth.exchangeCodeForSession(authCode: ). I'm guessing I should pass the code in the URL to that, but it's unclear what I'm supposed to do with the Session returned by this method.
any advice would be greatly appreciated. thanks!