Currently, I have encountered an issue with my NextJs project using Supabase Auth for authentication. I am currently utilizing the Discord provider and everything works fine initially. However, after a few minutes, the session object gets updated and the provider_token is set to null.
My authentication method is:
supabaseClient.auth.signInWithOAuth({
provider: 'discord',
options: {
scopes: 'identify guilds'
}
})
This problem specifically affects the "provider session" (Discord Session) within the session object, while the Supabase Session itself remains intact. The Discord access_token is referred to as "provider_token" in the supabase session.
provider_refresh_token: null
provider_token: null
refresh_token: "XXXXXX"
token_type: "bearer"
I am seeking advice on the best practice for handling this issue in NextJS with supabase. Thank you for your assistance!