supabase / supabase-flutter

Flutter integration for Supabase. This package makes it simple for developers to build secure and scalable products.
https://supabase.com/
MIT License
662 stars 155 forks source link

tokens it refreshes the token until the rate limit is reached #830

Closed BharathKumar-99 closed 4 months ago

BharathKumar-99 commented 4 months ago

from yesterday iam getting a issue with tokens it refreshes the token until the rate limit is reached because of this the supabase is being requested 5000 times by a single user

i dont know how to reproduce this as iam getting this when iam starting the app and calling the supabase

Expected behavior token regeneration should only trigger when expected

 static Future initialize() => Supabase.initialize(
      url: KeyConstants.SUPABASE_URL!,
      anonKey: KeyConstants.SUPABASE_ANON_KEY!,
      debug: true);

if it helps please check this

final supabaseAuth = SupaFlow.client.auth.onAuthStateChange
    .map<String>((response) => response.session!.user.id)
    .switchMap((id) => id.isEmpty
        ? Stream.value(null)
        : getFilteredRowStream(id).map((row) => log(row.toString())))
    .asBroadcastStream();

iam not sure if this the issue from flutter side or supabase

dshukertjr commented 4 months ago

Please stop creating new issues with the same content, and answer the question I have posted on the other issue. https://github.com/supabase/supabase-flutter/issues/829