首页 文章

Ember Rails通过简单验证和设计进行身份验证

提问于
浏览
-1

我已经尝试过按照本指南开始

https://adibsaad.com/blog/setting-up-ember-cli-with-a-rails-back-end-and-token-authentication-authorization

但它仍然不起作用 . 当我尝试访问受身份验证令牌保护的页面时,服务器会给我“未经授权的401” . 这里

https://github.com/francescabarbazeni87/Ember-Devise-Simple-Auth-Example-

有我的服务器和客户端代码 . 提前谢谢了 .

1 回答

  • 0
    class ApplicationController < ActionController::Base
      before_filter :authenticate_user_from_token!
    
      # Enter the normal Devise authentication path,
      # using the token authenticated user if available
      #before_filter :authenticate_user! <-----you dont need this line...delete or comment it out
    

相关问题