Browse files

Merge pull request #2 from ginnyd/master

Modification to allow site to be injected via a GET parameter
  • Loading branch information...
2 parents ff9bafd + 08b000d commit 8b9c7e350f1534d885880be4dda7a241862b6b33 @nashby committed Jul 16, 2012
Showing with 3 additions and 1 deletion.
  1. +2 −0
  2. +1 −1 lib/omniauth/strategies/stackexchange.rb
@@ -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
@@ -54,7 +54,7 @@ def params
def site
- || 'stackoverflow'
+ request.env['omniauth.params']['site'] || || 'stackoverflow'

0 comments on commit 8b9c7e3

Please sign in to comment.