Skip to content

Periodically delete inactive client sessions #943

@jmattheis

Description

@jmattheis

From #941 (comment)

With the changes in #941, we have a session cookie for both local login and OIDC login. The cookie expires after 7 days of inactivity. gotify should periodically delete clients of type session when there weren't used in the last 7 days.

LastUsed from the client is only set on use, so it may be nil when the client token was never used. We probably have to add a createdAt field to the client (and to be consistent to all other models). So it's possible check createdAt < now - 7 days && (lastUsed is null or lastUsed < now - 7 days) for the delete query.

Metadata

Metadata

Assignees

No one assigned

    Labels

    a:featureNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions