Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Personal Access Token As An Alternative Authentication Option #320

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

danielwrobert
Copy link

Due to the issue described in #314, the production application is no longer usable.

As a workaround, I've implemented the capability to connect to GitHub via a Personal Access Token. IIRC, this may have been a capability earlier on but this approach was removed in favor of the current authentication method.

As a starting point, I put together this PR so you can use the app via a local development instance by running yarn dev:desktop. This will open up the Electron application on your desktop and you can connect to GitHub with a Personal Access Token and use it.

IMPORTANT NOTE: Since I do not have familiarity with this code base, I used the agent AI feature in Cursor to work through getting this to a working state. After a few tries and a bit of guidance, I was able to get this up and running locally with the changes in this PR. That being said, there may be better ways to go about some of the implementation and I'm happy to make any preferred adjustments. My main goal was to have it working so I could, at the very least, spin up a local instance and use the app!

- Introduced a new `handleAuthError` function to centralize error handling for authentication failures, improving code readability and maintainability.
- Updated the `LoginHelpersProvider` to utilize the new error handling function during OAuth execution and personal access token login.
- Refactored the `onLoginRequest` saga to handle GraphQL errors more effectively, including detailed error responses.
- Adjusted the `LoginScreen` to ensure proper support for personal access token login on all platforms.
- Improved type safety by adding GraphQL error interfaces and enhancing existing type definitions.

These changes aim to provide a more robust user experience during authentication processes.
@danielwrobert danielwrobert marked this pull request as ready for review January 23, 2025 01:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant