设计+ Ruby的Patreon Oauth在铁轨上

发布于 2025-01-18 23:14:05 字数 271 浏览 2 评论 0原文

我已经在 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

我不是你的备胎 2025-01-25 23:14:05

您可以检索用户电子邮件和许多其他信息(请参阅此处)关于用户在登录调用 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文