jargonsdev / jargonsdev/jargons.dev

Bug: Handle GitHub OAuth Access Denied Error

オープン
#7 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

:arrow_upper_right: medium priority :bug: bug :sparkles: enhancement
主要言語
MDX
スター
56
フォーク
45
PR マージ指標
30日以内にマージされた PR はありません

説明

When using GitHub OAuth for authentication in our application, users may encounter an "access_denied" error if they deny our application access, leading to dead blank screen (see screenshot). This error needs to be handled gracefully to provide a good user experience and guide users on how to resolve the issue.

image

#### Solution:
1. **Error Detection:** Implement error detection logic in the OAuth callback handler to identify the "access_denied" error.

2. **Error Handling:** When the "access_denied" error is detected, display a user-friendly message to inform the user that their access has been denied and provide guidance on how to proceed.

3. **Logging:** Log the error details for debugging and monitoring purposes.

4. **Redirect:** Optionally, provide a redirect mechanism to allow the user to retry the authentication process or navigate back to a previous page.

#### Example Error Details:

- Full URL: `http://localhost:4321/api/github/oauth/callback?error=access_denied&error_description=The+user+has+denied+your+application+access.&error_uri=https%3A%2F%2Fdocs.github.com%2Fapps%2Fmanaging-oauth-apps%2Ftroubleshooting-authorization-request-errors%2F%23access-denied&state=path%3A%2Fsandbox%7Credirect%3Atrue`
- Error: `access_denied`
- Description: `The user has denied your application access.`
- Error URI: [GitHub OAuth Troubleshooting Documentation](https://docs.github.com/apps/managing-oauth-apps/troubleshooting-authorization-request-errors/#access-denied)
- State: `path:/sandbox|redirect:true`

#### Acceptance Criteria:
- Users are presented with a clear message when the "access_denied" error occurs.
- The message includes instructions or a link to resolve the issue.

#### Related Tasks:
- Implement error detection in the OAuth callback handler.
- Design and implement a user-friendly error message for the "access_denied" error.
- Test the error handling mechanism to ensure it works as expected.

#### Additional Notes:
- This issue is crucial for maintaining a positive user experience and ensuring users can easily resolve authentication issues.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

/api/github/oauth/callback の GitHub OAuth コールバックハンドラーから開始し、issue に表示されている access_denied URL を再現します。現在のコールバックの応答を追跡し、その後、拒否によって解決方法の案内を含む明確なメッセージが生成され、エラーの詳細がログに記録されることを確認します。実装されている場合は、再試行またはナビゲーションの動作をテストします。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
github, javascript
領域
api, authentication
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。