Define the home page when Supabase user ID has been manually deleted

Project Settings

Hello everyone,

In my application I have configured the authentication part with Supabase. Everything works fine (create user, modify, delete, reset password, forget password ....).

I have a particular situation:

If the user was logged in the last time the application was used, then the next time the application is launched, he's already logged in and the application displays the Logged In Page corresponding to a logged-in user. Fine, that's what I want.

But if, for special reasons, I manually delete the user account in Supabase, then when the app is launched, it logically assumes that the user was logged in the last time it was used, and so displays the Logged In Page corresponding to a logged-in user, but of course this can then trigger errors on actions based on the ID.

I wonder if it would be possible during the splashscreen to systematically check if the user ID exists. If it does, then the user arrives at the Logged In Page, if it doesn't then the user arrives at the Entry Page (logged-out user page).

This would avoid having to do this on the Logged In Page, as this corresponds to the main menu of the application for logged-in users, and so each time a loged-in user returns to this page it would trigger an unnecessary check.

Thank you for your help and suggestions.

What have you tried so far?

Searched in the forum.
Tried without success to set a custom action during the splash screen.

Did you check FlutterFlow's Documentation for this topic?
Yes
2
3 replies