• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

Logged in but not logging out

Q&A Forum › Category: ESP32 › Logged in but not logging out
0 Vote Up Vote Down
Andrew asked 6 years ago

Module 4 Unit 6 Making Your ESP32 Web Server Password Protected
I can use this log in code and it does log in the 1st time I do it. If I drop the Browser and then open the web page again I do not get the log in screen – it goes straight to the web page (with the buttons). The only way I can get back to the login screen is to reboot the PC. I have also tried clearing the cache – no luck.
Is there anyway of logging out automatically or manually?
Or what am I doing wrong?

Thanks
Andy

4 Answers
0 Vote Up Vote Down
Rui Santos Staff answered 6 years ago

Hello Andy, the authentication is saved in your web browser cache. So to be honest, I’m not sure why that’s happening. To log out, you have two options:

  • you can clear your cache
  • or when using the web server outside your devices, you can use the “incognito mode”

Which browser are you using? Did you restart your ESP8266 after clearing your cache?
Thanks for your patience.
Regards,
Rui

0 Vote Up Vote Down
Andrew answered 6 years ago

Hi Rui,
Many Thanks for your reply. Firstly I am following the “Learn ESP32 with Arduino IDE” and thus it is the ESP32 board that I am using.
I have moved onto the following Unit “Accessing the ESP32 Web Server From Anywhere” and I do not get a problem; it does provide me with the log in screen.
Revisiting the Unit “Making Your ESP32 Web Server Password Protected”.
I am using the Google Chrome Browser and had “cleared the cache” before
If I go back to how I was before then I can still replicate the problem. However If I follow your advice I again looked at Chrome and had not noticed that there is an option:
Clear Data for “Passwords and other sign-in data”
This cures my problem.
I know that this is probably beyond this course but what I was also asking is; If I visit a web site there is usually an option to Log Out or If the web page is dropped then the sign in on the web page is also dropped automatically. Is this possible to implement?
However as far as the course is concerned – then I am now happy.
Many Thanks
Andy

0 Vote Up Vote Down
Rui Santos Staff answered 6 years ago

Exactly! You need to clear the “Other sign-in data”, because it’s authentication data to access a web page.

This is a common question, so I’ve already tried to re-search a method to log out in the past. Unfortunately I’ve tried to search for a solution using different methods and I don’t think there’s a link or an easy solution that we could add to the web server that would clear that web browser data on disconnect… At least, I’ve tried to search and I couldn’t find anything that would allow us to that.

You’re welcome! I’m glad you’re enjoying the course.

Regards,

Rui

0 Vote Up Vote Down
Vitalie Dani answered 6 years ago

Hello, Rui. Great job, but please add a button EXIT  or LOG OUT, cause every time clear browser cash- is not the best solution. Thank You.

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025
  • [eBook Updated] Learn ESP32 with Arduino IDE eBook – Version 3.2 April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.