Skip to content

Conversation

@kennethrioja
Copy link
Contributor

@kennethrioja kennethrioja commented Dec 12, 2025

Summary of changes

  • We can now setup the seconds of expire_after through TeSS::Config.login_expires_after in tess.example.yml

Motivation and context

Security reasons, backed up by https://guides.rubyonrails.org/security.html#session-expiry

Checklist

  • I have read and followed the CONTRIBUTING guide.
  • I confirm that I have the authority necessary to make this contribution on behalf of its copyright owner and agree
    to license it to the TeSS codebase under the
    BSD license.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this test is needed.

Also I'm slightly worried that loading that initializer will impact the rest of the test suite somehow.

if Rails.env.production?
opts = { same_site: :lax, secure: true }
expiry_time = TeSS::Config.login_expires_after
opts[:expire_after] = expiry_time unless expiry_time.nil?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think change the nil check to expiry_time.blank? instead, just to be safe

@fbacall fbacall merged commit 7075be6 into ElixirTeSS:master Dec 16, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants