Authentication supabase

Hi team !

I am using supabase authentication system for my streamlit app which is a multipage app. One page is the login and another page display the data of the logged in user.

To retrieve the user in the page with data I have to store in session-state the token of the logged in user.

In my I Have:

user = supabase.auth.sign_in_with_password({"email": email, "password": password})
st.session_state["token"] = supabase.auth.get_session().access_token

and in my data page I retrieve the user like this:

user = supabase.auth.get_user(st.session_state["token"])

Could you please tell me what you think ? I would like to know if this us unsafe or not.

Many thanks for reading me.

hey hi ! welcome to the community
you can check out this docs for further understanding

Hey ! Thank you so much, the article is crystal clear . Sorry, obviously i have not looked well for the topic I should have found it by myself. Thanks for your support !

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.