简体   繁体   English

使用AngularJS进行Google OAuth2 Devise登录

[英]Google OAuth2 Devise Sign-in with AngularJS

Like this question , we are using the Google javascript API to call OAuth2 .... 这个问题一样,我们正在使用Google javascript API调用OAuth2...。

Next we need to sign the user in to the Rails server. 接下来,我们需要将用户登录到Rails服务器。 Since we use Devise, I'm assume we need to call Devise, but I'm not having much luck calling Devise outside of it's usual callback controller flow. 由于我们使用Devise,所以我假设我们需要调用Devise,但是在通常的回调控制器流程之外调用Devise并没有太多运气。

Anyone have a template for calling Devise with the token already in hand and passing the tolken to Devise to get just a basic authorization and user sign in? 任何人都有一个模板,可以使用现有的令牌来调用Devise,并将令牌传递给Devise以获得基本的授权和用户登录?

I think the ng-token-auth project may be what you (and much later now, I) are looking for. 我认为ng-token-auth项目可能就是您(现在很晚以后)想要的项目。 It's an angular module that's designed to work with devise token auth . 这是一个角度模块,旨在与devise令牌auth一起使用

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

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