我知道這已被問了很多,我見過很多解決方案,似乎並不適用於我的問題,所以我很抱歉如果我錯過了一些東西。ng-token-auth並設計令牌驗證確認重定向url
當使用ng-token-auth和devise-token-auth發送確認郵件時,確認郵件鏈接沒有redirect_url
,點擊它時會顯示錯誤頁面,但確認API調用成功。在ng-token-auth
配置
我設置: confirmationSuccessUrl: 'http://localhost:8000/#!/login'
在devise_token_auth.rb
我還設置: config.default_confirm_success_url = 'http://localhost:8000/#!/login'
我也試着重寫ConfirmationsController
其他許多解決方案建議,都無濟於事。
我已通過添加redirect_url
到confrimation_url
調用了臨時變通通過編輯色器件視圖confirmation_instructions.html.erb
:提前
confirmation_url(@resource, redirect_url:'http://localhost:8000/#!/login', confirmation_token: @token)
感謝,並請讓我知道如果我可以提供任何額外的信息。