Skip to content

expires_in does not work in initializer properly #105

@romikoops

Description

@romikoops

From documentation ...

In Rails, an auto-expiry of 1 month is set by default. You can alter that deal in an initializer with:

# config/initializers/global_id.rb
Rails.application.config.global_id.expires_in = 3.months

Unfortunately in my case it loads after railtie initializer (https://github.com/rails/globalid/blob/master/lib/global_id/railtie.rb#L16)
As result, it does not work, because SignedGlobalID.expires_in is set with default 1.month

My application details:

Rails 5.1.2

*** LOCAL GEMS ***

globalid (0.4.0)

As a workaround, I put config.global_id.expires_in = 3.months to config/application.rb

Should be fixed or the doc should be updated

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions