Authentication and authtoken

Options
BastienM
BastienM Member
edited September 2023 in ? Security

Hello,
I would like to add a login to my application so that I can display personalized information depending on who is logging in.
Context: I'm trying to create an application with Bravo for the front end and my back end is made from Xano, and I'm using their free versions. I know that with their paid versions it's possible to make a simple connection (with Bravo's custom login and with Xano's Data caching), but I can't afford to buy them because I'm only 19, and I'm still a student.
So I'm looking for a solution to be able to "save" the authtoken of the user who logs in and transmit it within all Xano requests that require authentication to be able to display the logged-in user's information within Bravo.
I've already tried using Bravo's variables to pass the authtoken within the query, and I've also tried authtoken within a column in my user table and calling the authtoken within my queries. But none of these solutions really worked.

Do you know if there are any solutions for authenticating and transmitting the authtoken on several queries in order to display information about the person logging on to the app?

Thanks for reading and I look forward to your suggestions.

Comments

  • Chris Coleman
    Chris Coleman Administrator

    ADMIN

    Options

    Hi @BastienM. While I can't speak much to the Bravo side of things, in Xano this is possible even with free accounts. When authentication is enabled in Xano, and an authentication token is sent along with a request, Xano makes the ID of the authenticated user available in the function stack, which would then allow you to query your database to return only data that is relevant to that user. Here's some more information about how this works on the Xano side.