Skip to content

Conversation

@IamPekka058
Copy link
Member

This pull request includes several changes to improve the GitHub OAuth login process and enhance error logging. The most important changes include the introduction of new methods to handle the login process, better error handling, and improvements to the lifecycle management of the login button widget.

Enhancements to GitHub OAuth login process:

  • lib/utility/github_oauth_handler.dart: Introduced startLoginProcess, pollForToken, resetHandler, and _retrieveDataFromResponse methods to handle the login process more effectively and added detailed logging for errors. [1] [2] [3]

Lifecycle management improvements:

  • lib/widgets/login.dart: Added WidgetsBindingObserver to LoginButton to manage the app lifecycle state changes and ensure the login process continues when the app is resumed. [1] [2]

Error logging enhancements:

Minor improvements:

Friedinger and others added 3 commits April 1, 2025 10:51
…ror handling

This commit refactors the GitHub OAuth process to enhance reliability and user experience. It introduces:

- App lifecycle integration: The login process now resumes correctly when the app returns to the foreground, ensuring users aren't interrupted.
- Improved error handling: Robust error logging and handling are implemented throughout the OAuth flow for better debugging and resilience.
- State management: The `GitHubAuth` class now tracks the login process state, preventing issues with concurrent login attempts.
- Token polling: The token retrieval process is refined with a limited number of attempts and clearer success/failure indicators.
- Dialog display: The user code dialog is now shown before launching the browser for a more consistent flow.
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 1 out of 5 changed files in this pull request and generated no comments.

Files not reviewed (4)
  • lib/utility/github_oauth_handler.dart: Language not supported
  • lib/views/home_view.dart: Language not supported
  • lib/widgets/login.dart: Language not supported
  • test/widget_test.dart: Language not supported

@IamPekka058 IamPekka058 added the πŸš‘οΈ Hotfix Critical or emergency fix label Apr 1, 2025
@IamPekka058 IamPekka058 mentioned this pull request Apr 1, 2025
@Friedinger Friedinger merged commit cc914ae into main Apr 1, 2025
@Friedinger Friedinger deleted the hotfix/github-device-flow-login branch April 1, 2025 16:57
@Friedinger
Copy link
Member

Friedinger commented Apr 1, 2025

Info: #16 was also included in this pull request

IamPekka058 pushed a commit that referenced this pull request Aug 8, 2025
πŸ”€πŸš‘οΈ GitHub device flow login
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

πŸš‘οΈ Hotfix Critical or emergency fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants