PLATFORM
  • Tails

    Create websites with TailwindCSS

  • Blocks

    Design blocks for your website

  • Wave

    Start building the next great SAAS

  • Pines

    Alpine & Tailwind UI Library

  • Auth

    Plug'n Play Authentication for Laravel

  • Designer comingsoon

    Create website designs with AI

  • DevBlog comingsoon

    Blog platform for developers

  • Static

    Build a simple static website

  • SaaS Adventure

    21-day program to build a SAAS

Question By
Solved

Is there a set length of time for the logged in cookie? Can I can change this?

Solved
alexmorning

Jan 30th, 2023 12:18 PM

Just wondering if the length of time that the user is logged in is a pre-defined length of time or if it's dependent on something with their specific browser. If this is something I can set, do you have any tips on finding this? I've checked but I think i'm not searching the right thing.

I just want to require a new-login after a week if they don't log out.

Thank you

bobbyiliev

Jan 30th, 2023 12:25 PM

Best Answer

Hi there!

What you could do is to change the SESSION_LIFETIME value in the .env file.

That way the session will end after the specified time.

The default value should be 9999 minutes but you can change that if needed.

Hope that this helps!

alexmorning

Jan 30th, 2023 12:34 PM

ahh, thank you. "Session" was the word that I was not thinking of, but this would have been helpful.

I am confused, though, because the .env file does not get sent to digitalocean when it is building the app, is that right? Does that mean that there is another area that will pull this information from the .env file before the build so it can use these values? Sorry I just want to understand how the env file works if it is not used when deployed.

bobbyiliev

Jan 30th, 2023 12:35 PM

Yes this is correct. For the DigitalOcean App Platform you can add the value as an environment variable directly via the UI as described here:

Define Runtime Variables After App Creation

Let me know how it goes!

naveedmunirch

Feb 6th, 2023 07:25 AM

The length of time for a logged in cookie is set by the website or application that issued the cookie. Some websites use session cookies that are deleted when the user closes their browser, while others use persistent cookies that last for a specified amount of time. Whether you can change the length of time for a cookie depends on the website and its implementation. Some websites may allow you to change the length of time for a cookie through your account settings, while others may not offer this option. If you are interested in changing the length of time for a cookie, you should check the website's privacy policy or contact the website's support team for more information.