Skip to content

Commit

Permalink
fix devise JWT
Browse files Browse the repository at this point in the history
  • Loading branch information
raquii committed Dec 6, 2024
1 parent 456aafe commit dcb423d
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 137 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@

# Ignore master key for decrypting credentials and more.
/config/master.key
/config/master.key.bak
/config/credentials.yml.enc.bak


# Ignore node modules
node_modules
3 changes: 3 additions & 0 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ class Application < Rails::Application
# Only loads a smaller set of middleware suitable for API only apps.
# Middleware like session, flash, cookies can be added back manually.
# Skip views, helpers and assets when generating a new resource.
config.middleware.use ActionDispatch::Cookies
config.middleware.use ActionDispatch::Session::CookieStore

config.api_only = true
end
end
1 change: 0 additions & 1 deletion config/credentials.yml.enc

This file was deleted.

1 change: 0 additions & 1 deletion config/credentials.yml.enc.bak

This file was deleted.

3 changes: 1 addition & 2 deletions config/initializers/devise.rb
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,7 @@

# ==> Configuration for :registerable

jwt_secret = ENV["DEVISE_JWT_SECRET_KEY"] || SecureRandom.hex(20) unless Rails.env.production?
jwt_secret ||= Rails.application.credentials.fetch(:secret_key_base)
jwt_secret = ENV.fetch("DEVISE_JWT_SECRET_KEY") { "713135daf69a905f3b1e3758ac144401c78a5c66553c845871998f1386c5b48869b043c3e50e45b63acba54daf1005004f9a38b7bdd6d6aa5e11181940b2564d" }

# When set to false, does not sign a user in automatically after their password is
# changed. Defaults to true, so a user is signed in automatically after changing a password.
Expand Down
1 change: 0 additions & 1 deletion config/master.key.bak

This file was deleted.

61 changes: 8 additions & 53 deletions frontend/node_modules/.package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

79 changes: 0 additions & 79 deletions frontend/node_modules/.vite/deps/_metadata.json

This file was deleted.

0 comments on commit dcb423d

Please sign in to comment.