Skip to content

Fix csrf_detect error with concurrent authorisations #88

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

ernesto-jimenez
Copy link

Right now, if multiple authorisations are started in different tabs, only the latest will succeed since session's state is overridden each time an authorisation starts.

This fixes that issue by having multiple states within a session rather than just one.

Note: there could still be race conditions when the session information is store is a cookie and a second authorisation is started before the browser has stored the cookie from the first one.

Fixes csrf_detected happening when more than one authorization is
started in several tabs, which means the session's "omniauth.state" is
overridden.
@ernesto-jimenez
Copy link
Author

@sferik CI fails because one of the gems is not installing in Ruby 1.8.7 and JRuby 18 mode

An error occurred while installing addressable (2.4.0), and Bundler cannot continue.
Make sure that `gem install addressable -v '2.4.0'` succeeds before bundling.
The command "eval bundle install --jobs=3 --retry=3" failed. Retrying, 2 of 3.

kwilczynski pushed a commit to paperlesspost/omniauth-oauth2 that referenced this pull request Sep 22, 2017
This commit adds changes against version 1.1.2 from an upstream patch,
see: omniauth#88; for more
details.

Signed-off-by: Krzysztof Wilczynski <kw@paperlesspost.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant