NoamB/sorcery — pull request #311 by ppworks (2012-06-16 03:32:48+00:00)
Title: Improve external provider callbak_url 

Hi, NoamB-san

Now, external_provider's callback_url setting should begin with http://...

```
# config/initializers/sorcery.rb
Rails.application.config.sorcery.configure do |config|
...
config.twitter.callback_url = "http://0.0.0.0:3000/oauth/callback?provider=twitter"
...
end
```

But, it's not DRY for example development and production.
My pull request could setting like follow.

```
# config/initializers/sorcery.rb
Rails.application.config.sorcery.configure do |config|
...
# if url begin with /, callback to your http://yourhost + callback_url
config.twitter.callback_url = "/oauth/callback?provider=twitter"
...
end
```

It's inspired by omniauth.
https://github.com/intridea/omniauth/blob/master/lib/omniauth/strategy.rb#L397