Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/config/initialization.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ The following settings are available for configuration in `config/initializers/d
| **`bypass_sign_in`** (`true`) | By default DeviseTokenAuth will not check user's `#active_for_authentication?` which includes confirmation check on each call (it will do it only on sign in). If you want it to be validated on each request (for example, to be able to deactivate logged in users on the fly), set it to false. |
| **`send_confirmation_email`** (`false`) | By default DeviseTokenAuth will not send confirmation email, even when including devise confirmable module. If you want to use devise confirmable module and send email, set it to true. (This is a setting for compatibility) |
| **`require_client_password_reset_token`** (`false`) | By default, the password-reset confirmation link redirects to the client with valid session credentials as querystring params. With this option enabled, the redirect will NOT include the valid session credentials. Instead the redirect will include a password_reset_token querystring param that can be used to reset the users password. Once the user has reset their password, the password-reset success response headers will contain valid session credentials. |
| **`header_names`** (`{'access-token' => 'access-token', 'client' => 'client', 'expiry' => 'expiry', 'uid' => 'uid', 'token-type' => 'token-type', 'authroization' => 'authroization'}`) | Makes it possible to change the headers names |

Additionally, you can configure other aspects of devise by manually creating the traditional devise.rb file at `config/initializers/devise.rb`. Here are some examples of what you can do in this file:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@
# :'client' => 'client',
# :'expiry' => 'expiry',
# :'uid' => 'uid',
# :'token-type' => 'token-type' }
# :'token-type' => 'token-type',
# :'authroization' => 'authroization' }

# By default, only Bearer Token authentication is implemented out of the box.
# If, however, you wish to integrate with legacy Devise authentication, you can
Expand Down
4 changes: 2 additions & 2 deletions test/dummy/config/initializers/devise_token_auth.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@
# config.headers_names = {:'access-token' => 'access-token',
# :'client' => 'client',
# :'expiry' => 'expiry',
# :'uid' => 'uid',
# :'token-type' => 'token-type' }
# :'token-type' => 'token-type',
# :'authroization' => 'authroization' }

# By default, only Bearer Token authentication is implemented out of the box.
# If, however, you wish to integrate with legacy Devise authentication, you can
Expand Down