【发布时间】:2016-09-05 15:12:12
【问题描述】:
我已经尝试了几个小时来重置密码以使用 ng-token-auth 和 devise-token-auth
根据文档
$auth.requestPasswordReset($scope.pwdResetForm)
.then(function(resp) {
// handle success response
})
.catch(function(resp) {
// handle error response
});
ng-token-auth 配置
angular.module('lessons').config ( $authProvider, RESOURCES ) ->
$authProvider.configure({
apiUrl: RESOURCES.DOMAIN
passwordResetPath: '/auth/password'
passwordUpdatePath: '/auth/password'
})
应向用户发送一封电子邮件,其中包含创建一次性会话的链接。我有所有的电子邮件方面的工作。
我现在得到了
Unpermitted parameters: redirect_url, password
Completed 401 Unauthorized
我的路线.rb
scope '/api' do
mount_devise_token_auth_for 'Teacher', at: '/auth'
end
我的登录/注销和其他一切工作正常,但我似乎无法让它工作。
我尝试使用$http 到url: "/api/auth/password" 手动编写POST
没有运气。结果相同。
有什么帮助吗?漂亮请
【问题讨论】:
标签: ruby-on-rails angularjs access-token