2

I've started using omniauth in a project but having some issues in production vs. development. In production my RailsURI is /myApp and in development it's just /

In my templates I use <%= link_to "/auth/google" do %> which works for production but not development since I need to link to "/myApp/auth/google". My route look like this:

match '/auth/:service/callback' => 'services#create'

Ideally, I'd like to have some setup like: <%= link_to provider_google_path %> generated for me for each provider I support. I guess I could support this by putting in a helper like <%= link_to provider(:google) %> but was wondering if there was a best practices way of solving this.

rforte
  • 1,167
  • 1
  • 11
  • 21

1 Answers1

0

It appears there is a similar question here that has an answer. You may want to take a look at that.

Create named routes for OmniAuth in Rails 3

Community
  • 1
  • 1
Matt Polito
  • 9,588
  • 2
  • 19
  • 13