Skip to content

Commit

Permalink
Merge pull request #347 from tbloncar/tb-redirect-callbacks
Browse files Browse the repository at this point in the history
Fully support OmniauthCallbacksController action overrides. Fixes #186.
  • Loading branch information
booleanbetrayal committed Aug 20, 2015
2 parents 47e8848 + 2cac1ef commit edca22e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
6 changes: 0 additions & 6 deletions config/routes.rb

This file was deleted.

3 changes: 3 additions & 0 deletions lib/devise_token_auth/rails/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ def mount_devise_token_auth_for(resource, opts)
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 "#{DeviseTokenAuth.omniauth_prefix}/:provider/callback", controller: omniauth_ctrl, action: "redirect_callbacks", via: [:get]
match "#{DeviseTokenAuth.omniauth_prefix}/failure", controller: omniauth_ctrl, action: "omniauth_failure", via: [:get]

# preserve the resource class thru oauth authentication by setting name of
# resource as "resource_class" param
match "#{full_path}/:provider", to: redirect{|params, request|
Expand Down

0 comments on commit edca22e

Please sign in to comment.