`emailRedirectTo` doesnt seem to work:

I have following code:
export const getUrl = () => {
    let url =
        import.meta.env.PROD ?
            import.meta.env.VITE_WEBSITE_URL :
            'http://localhost:5173/'
    url = url.startsWith('http') ? url : `https://${url}`
    url = url.endsWith('/') ? url : `${url}/`
    return url
}

export const signUp = async (email: string, password: string, first_name: string, last_name: string) => {
    return await supabase.auth.signUp({
        email: email,
        password: password,
        options: {
            data: {
                first_name,
                last_name,
            },
            emailRedirectTo: getUrl(),
        },
    })
}


And in Prod env I'm still getting redirected to localhost, I checked PROD var and WEBSITE_URL and they are set properly. What am I missing?
Was this page helpful?