Define multiple auth routes with omniauth

I am running a version of my rails application and I want to be able to authenticate a user with two different routes:

get 'v1/auth/:provider' => 'The omniauth method containing the appropriate callback'
get 'v1/auth/:provider/callback => 'v1/sessions#create'

get 'v2/auth/:provider' => 'The omniauth method containing the appropriate callback'
get 'v2/auth/:provider/callback => 'v2/sessions#create'

      

Is it possible to hack the prefix_path attributes so that I can generate both routes?

+3


source to share





All Articles