设计+ Ruby的Patreon Oauth在铁轨上
我已经在 Rails 应用程序中实现了 devise+patreon gem,没有出现任何问题。现在,devise 在创建用户时默认需要电子邮件/密码,但 Patreon 仅使用 oauth 集成。
我想知道,使用什么正确的策略,以便我可以将 Patreon Oauth 用户迁移为 Devise 用户,而不必设置虚拟密码/电子邮件来允许验证通过。我仍然希望最终允许用户通过 Devise 本地注册以及通过 Patreon 注册。
是否有一个我可能错过的已知策略/宝石/附加设计可以轻松实现这一目标?
I have implemented the devise+patreon gem in my Rails application without issues. Now, devise requires an email/password by default when creating a User, but Patreon just uses the oauth integration.
I am wondering, what is the proper strategy to use so that I can migrate the Patreon Oauth users as Devise users, without having to set dummy passwords/emails to allow for validation to go through. I still want to eventually allow users to register via Devise natively, as well as through Patreon.
Is there maybe a known strategy/gem/addition for devise that I may have missed that can easily achieve that?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以检索用户电子邮件和许多其他信息(请参阅此处)关于用户在登录调用 patreon 服务时的信息,但密码将保持未知,您不能只是复制&粘贴用户。
You can retrieve the user email and a lot of other infos (see here) about the user in the login call to patreon's services, but password will remain unknown, you can't just copy & paste a User.