Xano Bubble Authentication login/logout status

Options
Hi everyone,

I am able to get Auth/Me token from Xano and display info from Xano user table in Bubble. However, the default bubble current user also has a "current user is logged out/logged in" functionality. How can I continue to have this functionality if I use Xano authentication?  

I tried to make change to current user, but there isn't such a field in bubble. It seems the login status is stored in cookie.

Should I replicate a parallel user table in bubble to do the authetication? Originally I want to keep everything in Xano as I am building the webapp from ground up now. 

Please advise. Thank you.

Comments

  • Future
    Future Member
    Options
    Best advise : If you plan on using Xano, go all in. Use a local storage plugin and store the token in there (i also use the "environment variable" plugin to have access to the token and other stuff anywhere i want to aka "reusable elements")

    Xano made a great video on youtube to handle the sign in process and to authenticate each request afterward.
  • Franky Fan
    Franky Fan Member
    Options
    I also want to go all in with Xano. However I don't know how to replace bubble's "current user is logged in/logged out" function. For example, I have a login/logout button which shows different display and workflow based on the whether "current user is logged in" is yes.

    Now I have already managed to use the user table from auth/me api according to the video.
  • Michael Udinski
    Michael Udinski Administrator

    ADMIN

    Options
     a user being "logged in" or authenticated, means that they have a valid auth token from the backend (Xano), which is generated with the auth/login endpoint. Once your user successfully authenticates, the endpoints beyond this should typically require user authentication. Meaning you need to pass the auth token in the header for the user to continue doing "logged in actions". Logging out is typically just having your front-end (Bubble) forget the auth token.