pguardiario
pguardiario

Reputation: 54984

remapping omniauth paths for sinatra

I want to keep my sinatra code organized so I put my auth code in it's own app in my config.ru like so:

map "/" do
    run Main
end

map "/auth" do
    run Auth
end

The problem is omniauth sets up a route for providers at /auth/twitter.

I need to remap that route to /twitter but I can't find any documentation for how to do that.

Upvotes: 1

Views: 389

Answers (1)

pguardiario
pguardiario

Reputation: 54984

I found the answer myself:

use OmniAuth::Builder do
  configure do |config|
    config.path_prefix = ''
  end
end

Upvotes: 1

Related Questions