Skip to content

Add the config.session_key to override 'rack.session'#819

Closed
nicoolas25 wants to merge 1 commit intoomniauth:masterfrom
sleekapp:configure-session-key
Closed

Add the config.session_key to override 'rack.session'#819
nicoolas25 wants to merge 1 commit intoomniauth:masterfrom
sleekapp:configure-session-key

Conversation

@nicoolas25
Copy link

Hello,

This PR allows this kind of configuration:

OmniAuth.config.session_key = "rack.production.session"

Maybe some of you will find it usefull as I do ^^

Copy link
Contributor

Choose a reason for hiding this comment

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

This is not instance variable in origin code, I feel maybe there are some reason to not use instance variable (but author only knows...).

Copy link
Author

Choose a reason for hiding this comment

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

It isn't nope. It seems to use the default attribute accessor so it basically does the same thing. I updated it for clarity and it does not break the test suite, that's good enough for me ^^

@nicoolas25
Copy link
Author

Since Rack isn't yet allowing you to update the env's key where the session is stored (rack.session) this have a very small use case.

I'll close it but I think the cleaning in #818 may be worth merging.

@nicoolas25 nicoolas25 closed this Aug 4, 2015
@pas256
Copy link

pas256 commented Jul 29, 2016

I don't understand how to use this?
How do I inject something into the Rack env so that I can then use this?
For background, what I am doing is creating the OAuth redirects in my Rails 5 API only backend, so there is no session.

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