Log out API
Options
Khan aqib
Member ✭
How to create log out api any idea??
What exactly I will do for log out API
If once token is created by login API then how to delete that token or destroy that token using log out API
What exactly I will do for log out API
If once token is created by login API then how to delete that token or destroy that token using log out API
Comments
-
Hey logging out is handled by the front-end. You just need to forget the token from your front-end. Usually this is done within local or session storage. Once the token is forgotten the user is logged out. So a new token would need to be generated to log in again via the /login API
-
For anyone coming to this and not finding the other answer to be enough….and if you are using Wized like I am - I figured out that if you create an action and on click you set a cookie value to null, it is the same thing as essentially forgetting or destroying a cookie.
After having done it, it feels like a no-brainer but for some reason it wasn't clicking.
-
Thank you for leaving this method here. I was wondering the same thing!
-
Here's how I built this based on the example above. Essentially only clearing my user_id cookie value and sending them to a confirmation page.
-
thanks
Categories
- All Categories
- 53 ? Announcements
- 47 ? Releases
- 37 ? Welcome
- 983 ? Help! I'm a Noob
- 125 ? No-Code Front-Ends
- 633 ? Working with APIs
- 439 ? Transforming data
- 126 ? Connect Xano to ...
- 50 ?? Find an Expert
- 348 ❓Other questions
- 35 ? Security
- 22 ✂️ Snippets
- 19 ? Showcase
- 7 ?️ Xano Chatter
- 62 ? Video Tutorials
- 171 ? Request a feature
- 229 ? Report a Bug
- 19 ? Templates & Extensions
- 7 ? Feedback