Bubble + Storing token in User field

Instead of either approach, I’m storing the token using Bubble’s native User feature which seems to store data in a cookie when a “user” is not logged in.
So I simply have a Auth Token field on the User “thing” and then use the Update User action to set and clear the token.
So far it’s been working really well but I’m wondering, is anyone aware of any downsides or a reason this isn’t the approach recommended by Xano?
Comments
-
Trying to do similarly but with a different token provider. is the token you receive from bubble a jwe and if so how do you use it with create_auth_token function?
-
The token I’m storing is the Xano generated one, after hitting a login or signup endpoint. I’m 100% using Bubble on the frontend and Xano on the backend.
Not sure I understand your situation sorry. -
I understand your scenarion. Not what I was thinking. Thx
-
I'm storing token in local storage currently, but it seems to cause me some trobule (sometimes it looks like the token load is not fast enought which is causing 401 for some endpoints)
I'm considering storage of token in current user, but I'm concerned how long this data is hold for not logged-in user. I've heard somewhere that it is about 3 day which is a bit short since my users will have everlasting token.
Do you some info about this maybe?
-
Yes, for the temporary users (users who don't log in), Bubble deletes the cookies after three days.
Read more here- https://manual.bubble.io/help-guides/working-with-data/authenticating-users#temporary-users
-
@Pawel Magdanski yes, but there is this technique: https://www.youtube.com/watch?v=8Zgs-r_8VBI – have been thinking about implementing a lighter version of this but haven't gotten to it yet.
-
Also, you may want to check out the new Xano Bubble Connector Plugin: https://community.xano.com/discussion/4178590/xano-connector-plugin-for-bubble-by-eli-beachy#latest
-
Thanks for all the answers. I'm about to check out the Xano Bubble Connector plugin. I was also thinking about a mix solution, using not logged-in current user and update it whenever it's empty after 3 days with token from local storage.
Categories
- All Categories
- 46 📣 Announcements
- 47 🦾 Releases
- 36 👋 Welcome
- 924 🤷 Help! I'm a Noob
- 113 📱 No-Code Front-Ends
- 597 🌐 Working with APIs
- 418 🔢 Transforming data
- 120 🔌 Connect Xano to ...
- 46 🧑💻 Find an Expert
- 320 ❓Other questions
- 32 🔐 Security
- 22 ✂️ Snippets
- 19 🏆 Showcase
- 7 🗣️ Xano Chatter
- 60 📺 Video Tutorials
- 166 🙏 Request a feature
- 219 🐞 Report a Bug
- 19 🚀 Templates & Extensions
- 6 💬 Feedback