Skip to content

Use req.params[] instead of req[], which was removed in rack 3.1.0#122

Merged
pboling merged 3 commits into
omniauth:masterfrom
emon:hotfix/for_rack_3_1
Oct 4, 2024
Merged

Use req.params[] instead of req[], which was removed in rack 3.1.0#122
pboling merged 3 commits into
omniauth:masterfrom
emon:hotfix/for_rack_3_1

Conversation

@emon

@emon emon commented Aug 13, 2024

Copy link
Copy Markdown
Contributor

use req.params[] instead of req[], which was removed in rack 3.1.0
rack/rack#2183

the omniauth-identity worked with the following warning in rack 3.0.x

warning: Request#[] is deprecated and will be removed in a future version of Rack

However, omniauth-identity no longer works with an error in rack 3.1.x and needs to be fixed.

See also #116

emon added 2 commits August 13, 2024 09:54
use req.params[] instead of req[], which was removed in rack 3.1.0
rack/rack#2183
in registration_phase method
@pboling

pboling commented Sep 18, 2024

Copy link
Copy Markdown
Member

Thanks! Please rebase on latest master branch.

@pboling

pboling commented Sep 18, 2024

Copy link
Copy Markdown
Member

This a duplicate of #116, but closing that one, and keeping this one.

@pboling pboling left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@pboling

pboling commented Oct 4, 2024

Copy link
Copy Markdown
Member

Merging this because it passed the build on some Rubies. Will fix the others at some point, or someone can send a PR.

@pboling pboling merged commit 7eba12b into omniauth:master Oct 4, 2024
@emon emon deleted the hotfix/for_rack_3_1 branch October 13, 2024 00:40
@scott8803

Copy link
Copy Markdown

Any idea when this will be pushed into the wild? My bundle keeps pulling 3.0.9 which I think is 3 years old.

@pboling

pboling commented Oct 25, 2024

Copy link
Copy Markdown
Member

I'll work on getting a release out.

@scott8803

Copy link
Copy Markdown

I don't think this is correct:

  option :locate_conditions, ->(req) { { model.auth_key => req.params['auth_key'] } }

I've have an error come back saying req does not have a params (Its seems to already be the params).


I also seem to be getting a rack error (something like response[2]=... []= no method for nil. I have tried to trace this down and I can't see what's generating it. Just know that master causes it and my personally patched version of 3.0.9 does not. This seems to occur most on Register new user.

@pboling

pboling commented Nov 8, 2024

Copy link
Copy Markdown
Member

@scott8803 Thanks for the report. What version of rack are you on?

@pboling

pboling commented Nov 18, 2024

Copy link
Copy Markdown
Member

@scott8803 This fix is for compatibility with Rack v3.1+. Please check your rack version!

@scott8803

scott8803 commented Nov 18, 2024 via email

Copy link
Copy Markdown

@pboling

pboling commented Nov 18, 2024

Copy link
Copy Markdown
Member

Fix is released in v3.1.0 and v3.1.1!

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.

3 participants