Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Remember me" option on login page do not always work #32641

Open
lostmsu opened this issue Nov 25, 2024 · 4 comments
Open

"Remember me" option on login page do not always work #32641

lostmsu opened this issue Nov 25, 2024 · 4 comments
Labels
issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail

Comments

@lostmsu
Copy link

lostmsu commented Nov 25, 2024

Description

I basically hit this one, and it is annoying: #778

TL;DR; even if you "Remember me" you have to login periodically.

I believe the handling here is incorrect. If I keep coming to my Gitea instance this cookie needs to be updated periodically, or should never expire in the first place

Gitea Version

1.21.11

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

services.gitea = {
    enable = true;
    appName = "xxx";
    database = {
      type = "postgres";
      user = config.services.gitea.user;
    };
    dump = {
        enable = true;
        type = "xz";
    };
    mailerPasswordFile = "/var/lib/gitea/mailer.pass";
    settings = {
        indexer = {
            REPO_INDEXER_ENABLED = true;
        };
        mailer = {
            ENABLED = true;
            SMTP_ADDR = "smtp.office365.com";
            SMTP_PORT = 587;
            FROM = "...";
            USER = "...";
            PROTOCOL = "smtp+starttls";
        };
        server = {
            ROOT_URL = "...";
            DOMAIN = "...";
            HTTP_PORT = ...;
        };
        service = {
            DISABLE_REGISTRATION = true;
            ENABLE_NOTIFY_MAIL = true;
        };
    };
  };

Database

PostgreSQL

@yp05327
Copy link
Member

yp05327 commented Nov 27, 2024

Do you mean that if user checked Remember me, then we need to refresh the expire time of the token every time he access the web page?
Maybe this can be an option, but from my side, this approach seems not safe.

@lostmsu
Copy link
Author

lostmsu commented Nov 28, 2024

I don't know what the best practice is, but most services like GitHub don't force you to relogin every 2 weeks. Best do whatever they do.

@lunny
Copy link
Member

lunny commented Nov 29, 2024

Please upgrade to latest stable version and try again.

@wxiaoguang
Copy link
Contributor

1.22 has Enhanced auth token / remember me #27606 , which improves the "remember me"

@wxiaoguang wxiaoguang added issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail and removed type/bug labels Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail
Projects
None yet
Development

No branches or pull requests

4 participants