Oauth2-basic プラグインと pkce

Hello all,

I’m new to the oauth2-basic plugin and after reading the docs and source code, I cannot find an answer to my question.

  • Does the oauth2-basic plugin support pkce?
  • If so, how can I enable that?
  • If not, how might I modify the oauth2-basic plugin code to use pkce?

The omniauth github page README says that I should be able to set the pkce option to true in my omniauth strategy. However, I have attempted this change in the oauth2-basic plugin code and no code challenge is being sent to my authorize_url. Any suggestions?

Thanks in advance

「いいね!」 3

PKCE のサポートを求めているコミュニティの支援をしているため、これを再投稿します。

尋ねられるまでこれについては何も見ていませんでしたが、PKCE のドキュメント を確認したところ、主な推進要因はネイティブ アプリと SPA のようです。

ネイティブ アプリ

  • クライアント シークレットを安全に保存できません。アプリを逆コンパイルすると、アプリにバインドされ、すべてのユーザーとデバイスで同じになるクライアント シークレットが明らかになります。
  • リダイレクトをキャプチャするためにカスタム URL スキーム (例: MyApp://) を使用する場合があります。これにより、悪意のあるアプリケーションが承認サーバーから承認コードを受信できる可能性があります。

シングルページ アプリ

  • クライアント シークレットは、ブラウザ全体でソース全体が利用できるため、安全に保存できません。

これらはどちらもこの状況には当てはまりません。シークレットを保持しているのは Discourse サーバーです。

Animated GIF