Skip to content

Commit

Permalink
Use "Lax" for cookie "SameSite" restriction, otherwise OAuth2 does no…
Browse files Browse the repository at this point in the history
…t work

...because the session resets after the redirect, and so the stored nonce/state is lost.
  • Loading branch information
fbacall committed Aug 29, 2024
1 parent ae15d3f commit c626cc8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion config/initializers/session_store.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Be sure to restart your server when you modify this file.
opts = Rails.env.production? ? { same_site: :strict, secure: true } : {}
opts = Rails.env.production? ? { same_site: :lax, secure: true } : {}
Rails.application.config.session_store :cookie_store, **opts

0 comments on commit c626cc8

Please sign in to comment.