Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


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

merged 1 commit into from

2 participants


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

@ginnyd Thank you!


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
Thanks again!


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 
  2. +1 −1  lib/omniauth/strategies/stackexchange.rb
2 
@@ -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 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:
## Supported Rubies
2  lib/omniauth/strategies/stackexchange.rb
@@ -54,7 +54,7 @@ def params
def site
- || 'stackoverflow'
+ request.env['omniauth.params']['site'] || || 'stackoverflow'
Something went wrong with that request. Please try again.