How to update user email with Flutterflow and Suapabase

Knowing how to update your users email in our Flutterflow and Supabase apps is critical to a good user experience. Fortunately for us, this is built natively into Flutterflow and can be achieved without any custom actions.

There is an action built into Flutterflow in the Supabase authentication options that is called update email. Unlike the update user password version, this does complete the task of updating the email address. However this only does it in the auth.users table. If you have a public.users table in your Supabase schema, you will need to also update this to reflect the changes.

Despite this action not needing any custom code, I have included a snippet below which performs the same task should you wish to do something that will need customisation.

Here is the video.

Custom code

Despite not really needing any custom code to update a user email in Flutterflow, the snippets below will work if you need them. The first is the basic form and the second snippet changes the user email and returns any errors encountered to an app state variable to display to your users should you wish to.

Conclusion – Changing user email details Flutterflow apps

The ability for a user to update their email and the provision of forgot password actions are the two keystones of simple email authentication. Beyond these we need to be looking at social authentication and two factor authentication for better security and user experience. For us as app builders it passes some of the elements of authentication, such as passwords and 2FA onto others. Also, it gives our app a degree of trust with the user that email sign up alone does not provide. However, knowing how to change a user email address or password are simple fundamentals we need to know.