Skip to content

Commit

Permalink
Default config: add note about `passwordless_expire_old_tokens_on_sig…
Browse files Browse the repository at this point in the history
…n_in` only working with `MessageEncryptorTokenizer` (abevoelker#45)
  • Loading branch information
LLCampos authored Oct 15, 2023
1 parent 8e961c3 commit 6e3c26d
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 12 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,10 @@ config.passwordless_tokenizer = "SignedGlobalIDTokenizer"
# generate your own secret value with e.g. `rake secret`
# config.passwordless_secret_key = nil

# When using the :trackable module, set to true to consider magic link tokens
# generated before the user's current sign in time to be expired. In other words,
# each time you sign in, all existing magic links will be considered invalid.
# When using the :trackable module and MessageEncryptorTokenizer, set to true to
# consider magic link tokens generated before the user's current sign in time to
# be expired. In other words, each time you sign in, all existing magic links
# will be considered invalid.
# config.passwordless_expire_old_tokens_on_sign_in = false
```

Expand Down
7 changes: 4 additions & 3 deletions lib/generators/devise/passwordless/install_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,10 @@ def update_devise_initializer
# generate your own secret value with e.g. `rake secret`
# config.passwordless_secret_key = nil
# When using the :trackable module, set to true to consider magic link tokens
# generated before the user's current sign in time to be expired. In other words,
# each time you sign in, all existing magic links will be considered invalid.
# When using the :trackable module and MessageEncryptorTokenizer, set to true to
# consider magic link tokens generated before the user's current sign in time to
# be expired. In other words, each time you sign in, all existing magic links
# will be considered invalid.
# config.passwordless_expire_old_tokens_on_sign_in = false
CONFIG
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -330,8 +330,9 @@
# generate your own secret value with e.g. `rake secret`
# config.passwordless_secret_key = nil

# When using the :trackable module, set to true to consider magic link tokens
# generated before the user's current sign in time to be expired. In other words,
# each time you sign in, all existing magic links will be considered invalid.
# When using the :trackable module and MessageEncryptorTokenizer, set to true to
# consider magic link tokens generated before the user's current sign in time to
# be expired. In other words, each time you sign in, all existing magic links
# will be considered invalid.
# config.passwordless_expire_old_tokens_on_sign_in = false
end
7 changes: 4 additions & 3 deletions spec/generators/templates/expected/devise.rb
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,9 @@
# generate your own secret value with e.g. `rake secret`
# config.passwordless_secret_key = nil

# When using the :trackable module, set to true to consider magic link tokens
# generated before the user's current sign in time to be expired. In other words,
# each time you sign in, all existing magic links will be considered invalid.
# When using the :trackable module and MessageEncryptorTokenizer, set to true to
# consider magic link tokens generated before the user's current sign in time to
# be expired. In other words, each time you sign in, all existing magic links
# will be considered invalid.
# config.passwordless_expire_old_tokens_on_sign_in = false
end

0 comments on commit 6e3c26d

Please sign in to comment.