Please help! OauthProvider won't let me reach login pages on Heroku

183 views
Skip to first unread message

Tina G

unread,
May 23, 2013, 6:53:57 PM5/23/13
to catar...@googlegroups.com
Hey all,

I've gotten catarse setup great on my local server, and I've been able to push on Heroku. All the pages work fine except for the login pages, and when I check the logs, I'm getting the following error:

ActionController::RoutingError (No route matches {:controller=>"omniauth_callbacks", :action=>"passthru", :provider=>"facebook"}):

Did some research, and I believe I've done everything I needed to - I've set my OauthProviders for both Twitter and Facebook too to make this work? (I had the same problem in my local server, but the OauthProvider settings solved it.)

I did a little comparison between my local routes and the routes on Heroku and I notice this difference? Not sure whether it matters:

Local:
                  user_omniauth_authorize        /users/auth/:provider(.:format)                              omniauth_callbacks#passthru {:provider=>/Facebook|facebook/}
                   user_omniauth_callback        /users/auth/:action/callback(.:format)                       omniauth_callbacks#(?-mix:Facebook|facebook)

Heroku: 
                  user_omniauth_authorize        /users/auth/:provider(.:format)                              omniauth_callbacks#passthru {:provider=>/Twitter|Facebook/}
                   user_omniauth_callback        /users/auth/:action/callback(.:format)                       omniauth_callbacks#(?-mix:Twitter|Facebook)

I've been hitting my head on my desk for a while, so I'd really appreciate any help!

Thanks!
T

Paulo Geyer

unread,
May 23, 2013, 8:05:26 PM5/23/13
to catar...@googlegroups.com
There is any error message?

For twitter, you have to configure a callback URL

For facebook, you have to set up the app domain, you can create a dummy
app for development and another for production. Not sure, but I guess
the sandbox mode enables the use of localhost to be able to authenticate

You can also add your domain to your /etc/hosts (if you are using some
*nix), to point your app domain to your computer, then you wouldn't need
to do any of the changes above
> --
> You received this message because you are subscribed to the Google
> Groups "Catarse Dev" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to catarse-dev...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>


signature.asc

Tina G

unread,
May 28, 2013, 11:17:21 AM5/28/13
to catar...@googlegroups.com
Hmmm, I just added a Twitter callback URL, didn't seem to fix anything. My facebook app domain is currently set as app-name.herokuapp.com. Is that right? Or should I just do something like heroku.com / herokuapp.com?

Paulo Geyer

unread,
May 28, 2013, 1:27:42 PM5/28/13
to catar...@googlegroups.com
Do you have the OauthProvider table entries for facebook and twitter?
> > an email to catarse-dev...@googlegroups.com <javascript:>.
> > For more options, visit https://groups.google.com/groups/opt_out
> <https://groups.google.com/groups/opt_out>.

Tina G

unread,
May 28, 2013, 4:03:35 PM5/28/13
to catar...@googlegroups.com
Yes - this is what I get when I do a check.

irb(main):001:0> OauthProvider.all
  OauthProvider Load (3.4ms)  SELECT "oauth_providers".* FROM "oauth_providers" 
=> [#<OauthProvider id: 9, name: "Facebook", key: "xxxxxx", secret: "xxxxxx", scope: nil, order: nil, created_at: "2013-05-28 15:58:27", updated_at: "2013-05-28 15:58:27", strategy: "Facebook", path: "Facebook">, #<OauthProvider id: 12, name: "Twitter", key: "xxxxxx", secret: "xxxxxx", scope: nil, order: nil, created_at: "2013-05-28 16:11:13", updated_at: "2013-05-28 16:11:13", strategy: "Twitter", path: "twitter">]

It only fails on heroku, and I can access and login on my local server just fine? With these same credentials...

:(

Thanks in advance for any help.

Renan Silva Coutinho

unread,
Jul 14, 2013, 5:06:51 PM7/14/13
to catar...@googlegroups.com
I`m with the same problem. Do you found any solution ?

Thanks!

Luiz Fonseca

unread,
Jul 15, 2013, 7:08:33 AM7/15/13
to catar...@googlegroups.com
You have to change the facebook app url (or better, create another facebook app, with your local and your heroku url) to be able to login.


--

Renan Silva Coutinho

unread,
Jul 15, 2013, 12:50:35 PM7/15/13
to catar...@googlegroups.com
After restart heroku server it works !

Thanks a lot for the help.
Reply all
Reply to author
Forward
0 new messages