(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 を Microsoft の XBL ログインを使用してログインするように構成したいと考えており、このプラグインが開始点になるのではないかと思いました。
開発スレッドに投稿しました。
Minecraft の Discourse フォーラム「The Hive」が、私たちがやりたいことを利用していますが、それ用のプラグインが見つかりません。![]()
こんにちは!
コミュニティへの投稿にログインを必須にする方法はありますが、ログインせずに投稿を閲覧できるようにすることは可能でしょうか?
コミュニティでAuth0プラグインを有効にしました。また、ログインや匿名投稿の他のすべての形式を削除しました。基本的に、ユーザーコミュニティに投稿する前に、人々が当社の顧客であることを確認したいと考えています。しかし、ログインしていない他の人でも投稿を閲覧できるようにしたいと考えています。
Auth0プラグインが機能するように設定できた方法は、コンテンツを表示する前にログインを要求することです。何か見落としている設定はありますか?
よろしくお願いします!
「ログイン必須」をオンにした可能性があります。これを有効にすると、アカウントを持つユーザーのみがフォーラム投稿を表示できます。それを有効にする必要なしにSSOを使用できるはずです。 ![]()
サインアップ作成が完了し、エンドユーザーがメールを検証する前に、このURLが返されます。メールが検証される前にコミュニティへの引き継ぎを停止する方法はありますか?
セットアップに問題があります。すべてを有効にしてから Discourse でサインアップ プロセスを実行すると、Auth0 に正常に送信されますが、戻るとエラーメッセージが表示されます(「おっと、このディスカッション フォーラムを支えるソフトウェアで予期しない問題が発生しました。ご迷惑をおかけして申し訳ありません。」)。
ログを確認すると、エラーと思われるものが見つかりました。
ActiveRecord::NotNullViolation (PG::NotNullViolation: ERROR: relation "user_associated_accounts" の列 "provider_uid" に null 値があり、not-null 制約に違反しています
指示に従ってすべてを設定したことを再確認しました。この問題は、「OAuth2 JSON ユーザー ID パス」が間違っていて、そのフィールドが空になっていることが原因である可能性がありますか? sub に設定しました。
user.name.fullではなく、IDPがuser.name.firstとuser.name.lastのように別々のフィールドを提供すると仮定すると…
複数のユーザーJSONデータパスからOAuth2 JSONの名前パスの値を連結することは可能でしょうか?