Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No route matches [POST] "/api/v1/auth" #694

Closed
ghost opened this issue Aug 8, 2016 · 2 comments
Closed

No route matches [POST] "/api/v1/auth" #694

ghost opened this issue Aug 8, 2016 · 2 comments

Comments

@ghost
Copy link

ghost commented Aug 8, 2016

config/routes.rb

Rails.application.routes.draw do

  devise_for :users
  namespace :api do
    scope :v1 do
      mount_devise_token_auth_for 'User', at: 'auth'
    end
  end

rake routes output:

                    Prefix Verb     URI Pattern                               Controller#Action
          new_user_session GET      /users/sign_in(.:format)                  devise/sessions#new
              user_session POST     /users/sign_in(.:format)                  devise/sessions#create
      destroy_user_session DELETE   /users/sign_out(.:format)                 devise/sessions#destroy
             user_password POST     /users/password(.:format)                 devise/passwords#create
         new_user_password GET      /users/password/new(.:format)             devise/passwords#new
        edit_user_password GET      /users/password/edit(.:format)            devise/passwords#edit
                           PATCH    /users/password(.:format)                 devise/passwords#update
                           PUT      /users/password(.:format)                 devise/passwords#update
      new_api_user_session GET      /api/v1/auth/sign_in(.:format)            devise_token_auth/sessions#new
          api_user_session POST     /api/v1/auth/sign_in(.:format)            devise_token_auth/sessions#create
  destroy_api_user_session DELETE   /api/v1/auth/sign_out(.:format)           devise_token_auth/sessions#destroy
         api_user_password POST     /api/v1/auth/password(.:format)           devise_token_auth/passwords#create
     new_api_user_password GET      /api/v1/auth/password/new(.:format)       devise_token_auth/passwords#new
    edit_api_user_password GET      /api/v1/auth/password/edit(.:format)      devise_token_auth/passwords#edit
                           PATCH    /api/v1/auth/password(.:format)           devise_token_auth/passwords#update
                           PUT      /api/v1/auth/password(.:format)           devise_token_auth/passwords#update
api_v1_auth_validate_token GET      /api/v1/auth/validate_token(.:format)     devise_token_auth/token_validations#validate_token
       api_v1_auth_failure GET      /api/v1/auth/failure(.:format)            devise_token_auth/omniauth_callbacks#omniauth_failure
                           GET      /api/v1/auth/:provider/callback(.:format) devise_token_auth/omniauth_callbacks#omniauth_success
                           GET|POST /omniauth/:provider/callback(.:format)    devise_token_auth/omniauth_callbacks#redirect_callbacks
          omniauth_failure GET|POST /omniauth/failure(.:format)               devise_token_auth/omniauth_callbacks#omniauth_failure
                           GET      /api/v1/auth/:provider(.:format)          redirect(301)

You can see there is not a POST /api/v1/auth entry in it, so I can not signup by POST to my api /api/v1/auth.
Some one can help me to point out what's wrong with this ? Thanks

@ghost ghost changed the title RoutingError (No route matches [POST] "/api/v1/auth") No route matches [POST] "/api/v1/auth" Aug 8, 2016
@ghost
Copy link
Author

ghost commented Aug 8, 2016

close

@ghost ghost closed this as completed Aug 8, 2016
@tanguygo
Copy link

What was the issue?

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant