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
ruby-on-rails-4 devise omniauth


source to share


No one has answered this question yet

Check out similar questions:

45
Authenticate user with omniauth and Facebook for rails APIs?
25
Develop Omniauth App and Iphone / Android
6
Rails - OmniAuth-Facebook throws NoSessionError
3
Omniauth-facebook & Devise: if email exists
2
Omniauth cannot find a route
2
User authentication before accessing Omniauth routes
1
Omniauth Facebook Route Routes
1
Edit Develop default route from provider method to create method in controller when using Omniauth
0
Omniauth-saml in Rails: route not found error for / auth / saml / metadata
0
Come up with Omniauth-Saml: ["omniauth.auth"] nil



All Articles
Loading...
X
Show
Funny
Dev
Pics