我使用devise-token-auth,当我点击确认邮件中的链接时,我收到错误:
bad argument (expected URI object or URI string
)
当我使用此路线发出请求时
auth/confirmation/?confirmation_token=XXXXXXXXXXXX
我尝试过很多可以在互联网上找到的东西,但我找不到任何可行的东西。
我已经生成了ng-token-auth视图,但没有任何改变。
有没有人有想法?
提前致谢。
编辑:
的routes.rb
Rails.application.routes.draw do
mount_devise_token_auth_for 'User', at: 'auth', controllers: {
confirmations: 'devise_token_auth/confirmations',
passwords: 'devise_token_auth/passwords',
omniauth_callbacks: 'devise_token_auth/omniauth_callbacks',
registrations: 'devise_token_auth/registrations',
sessions: 'devise_token_auth/sessions',
token_validations: 'devise_token_auth/token_validations'
}
get '/google_api' => 'google_api#index'
end
rake routes
Prefix Verb URI Pattern Controller#Action
new_user_session GET /auth/sign_in(.:format) devise_token_auth/sessions#new
user_session POST /auth/sign_in(.:format) devise_token_auth/sessions#create
destroy_user_session DELETE /auth/sign_out(.:format) devise_token_auth/sessions#destroy
user_password POST /auth/password(.:format) devise_token_auth/passwords#create
new_user_password GET /auth/password/new(.:format) devise_token_auth/passwords#new
edit_user_password GET /auth/password/edit(.:format) devise_token_auth/passwords#edit
PATCH /auth/password(.:format) devise_token_auth/passwords#update
PUT /auth/password(.:format) devise_token_auth/passwords#update
cancel_user_registration GET /auth/cancel(.:format) devise_token_auth/registrations#cancel
user_registration POST /auth(.:format) devise_token_auth/registrations#create
new_user_registration GET /auth/sign_up(.:format) devise_token_auth/registrations#new
edit_user_registration GET /auth/edit(.:format) devise_token_auth/registrations#edit
PATCH /auth(.:format) devise_token_auth/registrations#update
PUT /auth(.:format) devise_token_auth/registrations#update
DELETE /auth(.:format) devise_token_auth/registrations#destroy
user_confirmation POST /auth/confirmation(.:format) devise_token_auth/confirmations#create
new_user_confirmation GET /auth/confirmation/new(.:format) devise_token_auth/confirmations#new
GET /auth/confirmation(.:format) devise_token_auth/confirmations#show
auth_validate_token GET /auth/validate_token(.:format) devise_token_auth/token_validations#validate_token
auth_failure GET /auth/failure(.:format) devise_token_auth/omniauth_callbacks#omniauth_failure
GET /auth/:provider/callback(.:format) devise_token_auth/omniauth_callbacks#omniauth_success
GET /omniauth/:provider/callback(.:format) devise_token_auth/omniauth_callbacks#redirect_callbacks
omniauth_failure GET /omniauth/failure(.:format) devise_token_auth/omniauth_callbacks#omniauth_failure
GET /auth/:provider(.:format) redirect(301)
google_api GET /google_api(.:format) google_api#index