Logging out
Let's see how to add a logout functionality.
Automatic log out when the browser is closed
Once a user has logged in, they will remain authenticated for the rest of the browser session. This is because the lifetime of the cookie containing the session ID is “session”, which means that as soon as you close the browser, you will no longer be authenticated. You can find this information in the Storage panel, as we saw before:
Get hands-on with 1400+ tech skills courses.