(oauth2_basic) Authentication failure! csrf_detected: OmniAuth::Strategies::OAuth2::CallbackError, csrf_detected | CSRF detected
Any ideas?
(oauth2_basic) Authentication failure! csrf_detected: OmniAuth::Strategies::OAuth2::CallbackError, csrf_detected | CSRF detected
Any ideas?
Is it possible to make Auth0 the only possible way to register and login?
Yes, just disable all the other login methods. (including the enable local logins setting)
Is it possible to just redirect to the Auth0 signup and not display the basic signup form?
If you want to hide all the Discourse login/signup UI, then you can turn off the enable local logins site setting
Thanks David. I did that but I’ve noticed that when I sign up using the modal and get redirected back to Discourse, it prompts again for a username and other details so it doesn’t look like Auth0 is passing that information back to Discourse. I’m wondering if the solution is to keep the modal simple with just email address and password on the Auth0 modal for registration and get the rest of the details on Discourse.
Problem is we want to keep the user data in one place using a custom database attached to Auth0.
how can i set logout redirect to i cant found anything about logout
如果用户尚未在 Auth0 中确认电子邮件地址,则仅要求验证电子邮件地址,oauth2 json email verified path 的值为 email_verified。
我是通过启用 oauth2 debug auth 设置并在 <DISCOURSE_URL>/logs 处检查日志找到此信息的。当我使用未经验证的帐户登录时,正文如下:
OAuth2 Debugging:
user_json: {
"sub"=>"auth0|XXXXXX",
"nickname"=>"YYYYY+unprovenauth",
"name"=>"YYYYYY+unprovenauth@ZZZZZZ.com",
"picture"=>"https://via.placeholder.com/150",
"updated_at"=>"2022-09-21T07:50:40.172Z",
"email"=>"YYYYYY+unprovenauth@ZZZZZZ.com",
"email_verified"=>false
}
@david
希望你能帮忙——我想配置 Discourse 使用微软的 XBL 登录,我认为这个插件可能是开始的方法。
我在这里发过一个帖子:
有一个名为“The Hive”的 Minecraft Discourse 论坛使用了我们想要的功能——我只是找不到它的插件。 ![]()
你好!
有没有办法要求在社区中发帖需要登录,但允许在不登录的情况下查看帖子?
我们已经为我们的社区启用了 Auth0 插件。并且我们已经删除了所有其他形式的登录和匿名发帖——我们基本上希望确保人们在发帖到用户社区之前是我们的客户。但我们仍然希望其他人即使在未登录的情况下也能看到帖子。
我能够让 Auth0 插件正常工作的方式是,它要求你在查看内容之前先登录。我是否错过了某个开关或设置?
谢谢!
看起来您可能开启了“需要登录”。启用此选项后,只有拥有账户的用户才能查看论坛帖子。您应该可以在无需启用该选项的情况下实现 SSO。![]()
此 URL 在创建注册后、最终用户验证其电子邮件地址之前返回。是否有办法在电子邮件经过验证之前阻止其转到社区?
我在这方面遇到了一些设置问题。启用所有内容后,然后通过 Discourse 上的注册流程,一切正常地发送到 Auth0,但当我返回时,我看到一条错误消息(“哎呀,为这个讨论论坛提供支持的软件遇到了意外问题。我们对造成的不便深表歉意”)。
查看日志时,我看到了我认为是错误的地方:
ActiveRecord::NotNullViolation (PG::NotNullViolation: ERROR: null value in column "provider_uid" of relation "user_associated_accounts" violates not-null constraint
我已仔细检查并按照说明配置了所有内容,听起来这个问题可能是由“OAuth2 JSON 用户 ID 路径”不正确且该字段为空引起的?我已将其设置为 sub。