fix: refresh token timing

This commit is contained in:
Vukasin 2025-07-23 23:17:05 +02:00
parent 5d1f5c9439
commit 02ade2280e
2 changed files with 8 additions and 2 deletions

View File

@ -113,7 +113,7 @@ jwt_expiry = 3600
enable_refresh_token_rotation = true
# Allows refresh tokens to be reused after expiry, up to the specified interval in seconds.
# Requires enable_refresh_token_rotation = true.
refresh_token_reuse_interval = 10
refresh_token_reuse_interval = 86400
# Allow/disallow new user signups to your project.
enable_signup = true
# Allow/disallow anonymous sign-ins to your project.

View File

@ -14,5 +14,11 @@ export const createClient = () => {
// console.log('Supabase URL:', supabaseUrl);
// console.log('Supabase Anon Key:', supabaseAnonKey);
return createBrowserClient(supabaseUrl, supabaseAnonKey);
return createBrowserClient(supabaseUrl, supabaseAnonKey, {
auth: {
autoRefreshToken: true,
persistSession: true,
detectSessionInUrl: true
}
});
};