Skip to content

Problem with setSession callback #313

Open
@Pierre-Saigot

Description

@Pierre-Saigot

I'm having a problem with the setSession function in Supabase. I have a function intended to return the new session after its creation, but the setSession method seems to return nothing. When I call my function with my "then" no callback is made in the "data", nor in the "error", Here is the corresponding code snippet:

export const supaSetSession = async (access_token, refresh_token) => {
    const supabase = useSupabaseClient()

    const { data, error } = await supabase.auth.setSession({
        access_token,
        refresh_token
    })

    return { data, error }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions