Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Modified to handle GET parameter for site

  • Loading branch information...
commit 08b000d7543c73958384f9ee94eb36f2000bf2cd 1 parent ff9bafd
@ginnyd ginnyd authored
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
Please sign in to comment.
Something went wrong with that request. Please try again.