简体   繁体   English

针对远程Rails API验证Ember-CLI和simple-auth

[英]Authenticating Ember-CLI and simple-auth against remote rails api

I have two separate apps, one is a rails api and the other is an ember-cli based client app to consume the api. 我有两个单独的应用程序,一个是Rails api,另一个是使用ember-cli的客户端应用程序。 The issue I'm having is trying to figure out how to send the authentication requests to the rails app (using devise, btw). 我遇到的问题是试图弄清楚如何将身份验证请求发送到Rails应用程序(使用devise,btw)。 Anyone have any insight or links to some examples of how to accomplish this? 任何人都对如何实现此目标有一些见解或链接吗?

您必须确保a)您的Rails应用程序已启用CORS( http://enable-cors.org ),并允许来自Ember应用程序来源的请求,以及b)将Rails应用程序的来源白名单( http:// ember-simple- auth.simplabs.com/ember-simple-auth-api-docs.html#SimpleAuth-Configuration-crossOriginWhitelist ),以便Ember Simple Auth实际上会验证对Rails应用程序的请求。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM