Previous video:

🇺🇸 Test (6/8)

Intro

Let’s tackle some very necessary features associated to a profile.

This new video will show you how to log out of an account and how to modify it. These notions will be essential to the management of user accounts.

We hope you enjoy the tutorial!

Content of the video

Logging out ( - ) Completing your profile ( - ) Modifying your profile ( - )

Transcript

1. Logging out

Hi. In this video about Supabase and the creation of an account with VOltapp, I will show you how to modify your profile and log out. In the previous video, I showed you that you had to modify the graph of the Home page. Actually, I had to add a condition that verified the authentication of the user. I will do the same thing in the profile graph. You have to do the same for all the pages of the application that require the user's connection. To put it in a nutshell: when the page appears, if the user is authenticated, nothing changes, otherwise he is redirected to the login page. You can see the presence of a log out button. I will modify its graph. I add a click block that I connect to an action declared by supabase auth: "log out". Then I link it to a condition. In case of error, the graph must set the errorProfileMessage variabe. I will connect this block to the error branch of the "logout" block. In case of success, the user is redirected to the login page. I have to use the replace mode because I don't need the navigation history. I will test it quickly. Here I am on Homepage. I press the logout button. I am logged out. I log in again and I go back to profile.

Resources

The graph

Condition block

Click block