Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Modification to allow site to be injected via a GET parameter #2

Merged
merged 1 commit into from

2 participants

@ginnyd

As we discussed the other day, here is a change that will allow the site to be injected via a GET parameter, thus allowing multiple sites to be supported by the GEM concurrently

@nashby nashby merged commit 8b9c7e3 into from
@nashby
Owner

@ginnyd Thank you!

@ginnyd
@nashby
Owner

No worries! Yeah the right way was to make a new branch and a new PR. You can find a lot of information about pull requests here https://help.github.com/
Thanks again!

@ginnyd
@nashby
Owner

Common workflow is the next:

  1. Fork the repo.
  2. Create a new branch with git checkout -b branch_name
  3. Make PR with your changes from that branch.

and if you have to do another PR you just repeat steps 2-3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jul 16, 2012
  1. @ginnyd
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 1 deletion.
  1. +2 −0  README.md
  2. +1 −1  lib/omniauth/strategies/stackexchange.rb
View
2  README.md
@@ -30,6 +30,8 @@ You will obviously have to put in your client_id, client_secret and public_key,
You will also need to specify a site option to uniquely identify the StackExchange site (e.g. `stackoverflow` or `superuser`) you wish to authenticate against. A list of valid site api keys can be found at https://api.stackexchange.com/docs/sites. It's `stackoverflow` by default.
+If your application needs to be able to support multiple StackExchange sites, you can pass the site api key as the value for a GET parameter named sites (e.g. /auth/stackexchange?site=superuser)
+
Now just follow the README at: https://github.com/intridea/omniauth
## Supported Rubies
View
2  lib/omniauth/strategies/stackexchange.rb
@@ -54,7 +54,7 @@ def params
end
def site
- options.site || 'stackoverflow'
+ request.env['omniauth.params']['site'] || options.site || 'stackoverflow'
end
end
end
Something went wrong with that request. Please try again.