Skip to content

Commit

Permalink
Allow omniauth redirect post method (lynndylanhurley#1563)
Browse files Browse the repository at this point in the history
  • Loading branch information
florindiconescu authored Nov 16, 2022
1 parent 017fe04 commit 17619af
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/devise_token_auth/rails/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ def mount_devise_token_auth_for(resource, opts)

# omniauth routes. only define if omniauth is installed and not skipped.
if defined?(::OmniAuth) && !opts[:skip].include?(:omniauth_callbacks)
match "#{full_path}/failure", controller: omniauth_ctrl, action: 'omniauth_failure', via: [:get]
match "#{full_path}/:provider/callback", controller: omniauth_ctrl, action: 'omniauth_success', via: [:get]
match "#{full_path}/failure", controller: omniauth_ctrl, action: 'omniauth_failure', via: [:get, :post]
match "#{full_path}/:provider/callback", controller: omniauth_ctrl, action: 'omniauth_success', via: [:get, :post]

match "#{DeviseTokenAuth.omniauth_prefix}/:provider/callback", controller: omniauth_ctrl, action: 'redirect_callbacks', via: [:get, :post]
match "#{DeviseTokenAuth.omniauth_prefix}/failure", controller: omniauth_ctrl, action: 'omniauth_failure', via: [:get, :post]
Expand Down

0 comments on commit 17619af

Please sign in to comment.