Bubble: Do I need to change the names of Local Storage plugin on every page?

Options
Hello,

I'm new to Xano and after watching Michael's videos on authentication, I have a question about using Local Storage plugin in Bubble.

To help me know which plugin I'm pushing the authToken to, I rename them based on the page the plugin is on. So for example, instead of using the default name of Local Storage A throughout the app, I name them as Local Storage Login, Local Storage Signup, Local Storage Homepage, Local Storage Projects, etc.

However, I'm now trying to build a workflow to log out a user and I realize I have many Local Storage plugins with different names holding the authToken. I have two questions:
 
1.  If the user decides to log out while on the Homepage, I could theoretically have a workflow delete the authToken stored in Local Storage Homepage but what happens to the authTokens stored in Local Storage Projects and other such plugins on my app pages?
2. If I maintain one name for all the Local Storage plugins used on all pages in my app, does deleting the authToken on one page delete all the authTokens in the app because the same name was used for all the Local Storage plugins?

Comments

  • Michael Udinski
    Michael Udinski Administrator

    ADMIN

    Options
     - you should only need to create one key for your authtoken which you should be able to use across your Bubble application. Clearing the authtoken should clear it from the local storage, which would mean throughout your app
  • Eben
    Eben Member
    Options
    Thank you. Clearing it did the trick!