I signed into my app while testing the preview and now when I log out and try to preview again it auto logs me back in. How do I stay logged out?
check if the home screen is not the first screen when a user is not logged in
If Adalo automatically logs you back in after logging out, here are some solutions to fix the issue:
- Clear Local Storage and Cache
Adalo stores login sessions in your browser’s local storage.
Try clearing your browser cache and cookies, then refresh the preview.
In Google Chrome:
-
Press F12 to open Developer Tools.
-
Go to the Application tab > Local Storage.
-
Find Adalo’s data and clear it.
-
Use Incognito/Private Mode
Open your app in Incognito Mode (Ctrl + Shift + N in Chrome) and log out.
Then, close the window and reopen in normal mode.
- Force Logout with a Custom Action
In your Logout button, ensure that the action is correctly set to Log Out User.
Add an additional action: Link to Login Screen to ensure the app redirects correctly.
- Manually Reset the User
If Adalo is storing your login session, go to your Users collection in the Adalo database and delete your test account.
Create a new test account and try logging in again.
- Try a Different Browser
Sometimes, browser settings affect session storage. Try using Firefox, Edge, or Safari and check if the issue persists.
If none of these work, let me know, and we can troubleshoot further!
Hi @CharlesBN,
Here is how it works. When you launch an Adalo app (be it a browser-PWA or a native app), it looks whether an authentication token for a user exists (in other words, if some user is logged-in into the app already).
If a token doesn’t exist, the app redirects you automatically to “Welcome” screen.
If a token exists, then the app redirects you to “Home” screen.
So in your case, once you’ve logged in with some user, you are always redirected to home screen, which is expected. In order to logout, you need to add an action in the app somewhere to log out (Actions → More → User Log-In → Logout). E.g. you can add an action to some button and press it, your user will be logged out from the app and at the next time you are redirected to Welcome screen.
Best,
Victor.
@Wiseman everybody likes to use AI assistants, but some of these advices are misleading.
- There is no any “Custom action to force logout”. Custom action in fact is an API call to some external endpoint. There is no “force logout” in it.
- If you manually delete the account of the user which is logged-in, then the app will become working incorrectly. The user will be directed to a Home screen nevertheless, but as there is no record for the logged-in user, the app will start glitching heavily in all the functionality which is related to logged-in user. So this is not a solution but rather a path to have even more problems.
- Of course in the different browser at the first time the app will be launched as “fresh” instance and one will get to Welcome screen. But after first login the situation will be absolutely the same as in the 1st browser.
If you are trying to help other Makers in the forum, I would advice to test the advices first on your end, and then suggest solutions.
Victor.
Thank you ! This was very helpful
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.