Is there a way to login, logout, and restrict page access to authenticated users on Wappler if you have your own existing backend (e.g. Xano)?

Hello,

I have an external database (Xano) hosting my data and I would like to use that primarily as my backend in Wappler. Xano allows connection to the database tables for Enterprise plans (which I’m not on) so I can only use API calls (external to Wappler) to login/logout users and secure the app access. I’m not a developer so going the typical db route as common on Wappler will mean I’ll lose out on the ability to create custom backend cloud functions / logic that Xano enables for me in a no-code fashion.

This is what I want to do / have been able to do. I could do with some assistance or direction:

  1. Login user: Done. I used an external API request to Xano through Server Connect for that.

  2. Store authentication token generated from signup: Done but stored this in a session variable on the layout page to be accessible to all pages (couldn’t figure out how the Globals worked). Is there a way to store the auth token privately without exposing it when you inspect a website’s code?

  3. Restrict app/page access to authenticated users; otherwise, redirect to login page: I can’t seem to figure out both actions. I can’t use the Security Providers method because I’m relying on Xano APIs for all my authentication flows since that’s where my data is stored. Bubble was intuitive enough for me to do that with Xano’s APIs but I can’t figure out a way to do these things on Wappler.

  4. Logging out a user: How would you accomplish this using external APIs? On Bubble, there was a way for me to clear the storage where I had the auth token stored. And then redirect to the login page if that storage was empty. I used this flow as well for when the auth token expired. But I can’t figure it out on Wappler.

Any ideas or assistance on #2, #3, and #4 will be much appreciated. If you don’t know the answers to all but only to just one, I’d appreciate that as well. Thank you.

Community Page
Last updated: