Supabase Rest Api login

I use the Supabase API for login. After switching all my projects to Supabase, I noticed that FlutterFlow did not recognize when I was logged in. To resolve this, simply pass the refresh token from the API response:

import 'package:supabase_flutter/supabase_flutter.dart';
import '/auth/auth_manager.dart';
import 'package:provider/provider.dart';

Future<void> handleCustomLoginCallback(String refreshToken) async {

 try {

if (refreshToken.isEmpty) {

throw Exception('Refresh token cannot be empty');

}

await SupaFlow.client.auth.setSession(refreshToken);

} catch (e) {

throw Exception('Failed to set authentication session: $e');

}
10