Define multiple auth routes
Author: jeromeboeCreated Sep 25, 2014Updated Apr 12, 2024
I'm versioning my rails app and I want to be able to authenticate an user with 2 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 I can generate both routes ?
Source: omniauth/omniauth