Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Improve external provider callbak_url #311

merged 2 commits into from Jun 20, 2012


None yet
2 participants

ppworks commented Jun 16, 2012

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 = ""

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"

It's inspired by omniauth.

NoamB added a commit that referenced this pull request Jun 20, 2012

Merge pull request #311 from ppworks/master
Improve external provider callbak_url

@NoamB NoamB merged commit 82a33bc into NoamB:master Jun 20, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment