wachira
10/24/2021, 12:44 AMjavascript
async function signIn() {
const { error, data } = await supabase.auth.signIn(
{
email,
},
{
redirectTo: "http://localhost:3000/verify",
}
);
if (error) {
console.log({ error });
} else {
setSubmitted(true);
}
}
The email is sent out successfully but I have a problem with the redirect link, somehow supabase is adding a #
to the url, so am getting
http://localhost:3000/verify#access_token=<ACCESS_TOKEN>&expires_in=3600&refresh_token=<REFRESH_TOKEN>&token_type=bearer&type=magiclink
instead of
http://localhost:3000/verify?access_token=<ACCESS_TOKEN>&expires_in=3600&refresh_token=<REFRESH_TOKEN>&token_type=bearer&type=magiclink
silentworks
10/24/2021, 12:57 AMsilentworks
10/24/2021, 12:57 AMwachira
10/24/2021, 12:58 AMsilentworks
10/24/2021, 1:00 AMwachira
10/24/2021, 1:02 AMwachira
10/24/2021, 1:02 AMwachira
10/24/2021, 1:03 AMjavascript
import { createClient } from '@supabase/supabase-js'
const supabaseUrl: any = process.env.NEXT_PUBLIC_SUPABASE_URL
const supabaseAnonKey: any = process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY
export const supabase = createClient(supabaseUrl, supabaseAnonKey)
silentworks
10/24/2021, 1:03 AMwachira
10/24/2021, 1:07 AMwachira
10/24/2021, 1:08 AM/verify
url to additional redirect urls,wachira
10/24/2021, 1:08 AMwachira
10/24/2021, 1:09 AMredirectTo
value to /verify?success=yes&
but I still got /verify?success=yes#access_token=...
Psymin
10/24/2021, 7:33 AMwachira
10/24/2021, 2:21 PMwachira
10/24/2021, 2:21 PM/verify
, then how am I going to get the access_token
sent to the email