Auth0を使用したサインアップとログインをOAuth2 Basic Pluginで設定する

@jerdog I have an open support ticket which one of your engineers has been working with me on. Happy for you to use that if it cuts time debugging! Ticket is #44440

Ruth

I tried now with a new profile from an American site i.e. withou the “eu”: https://testestukune.auth0.com/authorize

I am stuck on the same problem! :worried:

「いいね!」 1

@RCheesley / @Serginho_Cintra / @blake - we are looking into this and will get with you as soon as we see what’s going on

「いいね!」 1

From the other thread:

oauth2 json user id path : sub
oauth2 json username path : nickname
oauth2 json name path : name
oauth2 json email path : email

Quite different from the identities.[].id posted above!

Yes - things have likely changed from post #1 in terms of required settings

「いいね!」 1

@riking see this post for why I had that.

「いいね!」 1

@RCheesley and @Serginho_Cintra

The key part that we were missing is that we need to specify a scope when we ask Auth0 for user info.

I’ll update the original post with the correct values you need.

And thanks @jerdog for the help :slight_smile:!

「いいね!」 4

Fantastic, thanks so much for all the help guys, hugely appreciated!

Ruth

「いいね!」 3

Sorry @charchar, I don’t understand how you overcame the “error message with no other options” problem.
I’m stopped just at this point…

Hello!

If the user is new to Discourse, then, after authentication, a window appears with the data of the new user. Is it possible to somehow create a Discourse user automatically, without showing this window? The user is already created on Auth0 …

It is not currently possible, but we hope to add it soon

https://meta.discourse.org/t/openid-connect-authentication-plugin/103632/56?u=david

「いいね!」 2

Is the same situation with the discourse-saml plugin?

The SAML plugin creates the user automatically. We’re planning to make the same functionality available in other plugins.

「いいね!」 3

これに関する更新情報はありますか?

当サイトでは auth0 を使用した oauth2-basic のみで認証を行っており、ローカルログインは無効化されています。Discourse 側で新規ユーザーが作成されず、ログインが失敗しても何も表示されないため、新規ユーザーを追加する方法がありません。この問題は beta9 へのアップグレード時に発生したのか、数週間前に oauth2-basic に切り替えた時に発生したのか、明確ではありません。

現時点では、たとえ「アカウントを作成」画面を一度クリックする必要があるとしても、全く問題ありません。

追記:テーマコンポーネントが新規ユーザーモーダルの表示を妨げていたことが判明しました。ただ、このステップをスキップできる方法には依然として関心があります。

「いいね!」 1

logout redirecthttps://SITENAME.auth0.com/v2/logout(または https://SITENAME.auth0.com/v2/logout?returnTo=SOME_URL_THAT_IS_IN_ALLOWED_LOGOUT_URLS)に設定しておくことで、Discourse からログアウトすると Auth0 からもログアウトされます。

「いいね!」 5

すべてのプラグインで利用可能になりました :tada:

「いいね!」 7

Auth0 を使用した SSO の設定については、ガイドに従って問題なく完了しました。ただし、Auth0 側で avatar_url が更新されても、Discourse 側には反映されません。管理者アカウントと一般アカウントの両方でログイン・ログアウトを試みました。念のため補足しますが、サインアップ時にはアバターが正しく設定されるものの、その後の Discourse 上での更新が行われません。ログのデバッグ出力を確認したところ、user_json には更新された avatar_url が含まれていることが確認できました。

「いいね!」 2

@blake これ既知の問題でしょうか、それとも私の設定で修正すべき点がありますでしょうか?

最終的に oauth2_basic プラグインを無効にし、こちらの記事で説明されているように Auth0 ルールを使用して SSO フローを実行しました:https://blog.leog.me/discourse-sso-with-auth0-e49486d0294a

私が変更した点の一つは、sso_secret をアプリケーションのメタデータではなく、ルール設定に格納するようにしたことです。

client_id も含めてください
https://auth0.com/docs/logout/redirect-users-after-logout