单独使用Devise和OmniAuth登录 [英] Single Sign On with Devise and OmniAuth

查看:183
本文介绍了单独使用Devise和OmniAuth登录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有很多关于使用OmniAuth和Devise能够使用Facebook和Twitter进行登录到webapp的信息。但是,我试图写我自己的OAuth提供者,而不是使用fb / twitter等(并且没有找到例子)。

There is a lot of information about using OmniAuth and Devise to be able to login to a webapp using facebook and twitter. However, I am trying to write my own OAuth provider and not use fb/twitter etc. (and failing to find examples).

我基本上想要有两个应用程序 - 一个具有用户表的UserManager和WebApp1(以后可能会更多)。我希望用户能够访问WebApp1并被重定向到UserMAnager以便能够登录,然后被重定向回到WebApp1。我不希望WebApp1拥有一个用户表。

I basically want to have two apps - a UserManager which has a table of users, and WebApp1 (and possible more in the future). I want a user to be able to go to WebApp1 and be redirected to the UserMAnager to be able to login, and then be redirected back to WebApp1. I don't want WebApp1 to have a table of users.

我可以有一些指针吗?在这个阶段我相信我需要Devise在这两个应用程序和OmniAuth在WebApp1,虽然我不是100%确定。

Can I have some pointers? At this stage I believe I need Devise in both apps, and OmniAuth in WebApp1, although I'm not 100% certain.

推荐答案

不知道你是否还有这个问题。

Not sure if you still have this as a question.

有一个很好的写作听起来非常类似于你的用例。

There is a nice writeup that sounds very similar to your use case.

http://blog.joshsoftware.com/2010/12/16/multiple-applications-with-devise-omniauth-and-single-sign-on/

最好的运气

这篇关于单独使用Devise和OmniAuth登录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆