Login with github is not saved. Need to sign up every time

I have to login everytime I want to access stuff. I log in with github and have clicked on “save my data” befoe I sign in with github. But doesn’t work so far. Any Ideas?

The auth cookie was still set to a lifetime of 1d. I now extended it to 31d.
Let me know if that helped!

Thank you for the quick reaction. Logged in yesterday but had to login today again. Do I maybe need to delete the old cookie?

Usually not, as the cookie name is now different and the old one shouldn’t matter.

You can try to use the username/pw login and see if that changes it.
However, long-term the GitHub SSO option should work in an identical manner. However, there are no other admin settings than setting the “auth” cookie and its expiration within Forgejo. I assumed it might apply to all auth methods, so far.

I haven’t used the GH SSO myself but will do so now and check how my experience is.

(You can see the cookie in your browser devtools under “storage” - it should have an expiration of ~30 days (if you created it yesterday).)

EDIT: The codoefloe_auth cookie is only set for username/pw logins, the GH SSO login doesn’t set it.

@jonibeckch did this improve lately?

No, still need to sign up every new day i want to login. But it’s not a big issue, i can live with it :slight_smile:

@jonibeckch Thanks, I’ll keep this in mind.

FWIW, if you set a password in your account settings and use the username/pw route, the “remember me” button would take effect and this should definitely keep you logged in for one month.

Just used the “forgot password” function to set a password and logged on with this. Will check it and see if that works! Will let you know!

works better now! Can’t remember a manual login needed.

1 Like

Great to hear! Let’s consider this as “solved” then. We can’t really do anything for the GH oAuth integration on our end, so the way to go is to use the username/pw login to have a working cookie which remembers user presence.

Maybe this will solve itself overtime in newer Forgejo versions.