Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add Personal Access Token As An Alternative Authentication Option#320

Open
danielwrobert wants to merge 2 commits intodevhubapp:master from
danielwrobert:add/local-personal-access-token-login
Open

Add Personal Access Token As An Alternative Authentication Option #320
danielwrobert wants to merge 2 commits intodevhubapp:master from
danielwrobert:add/local-personal-access-token-login

Conversation

@danielwrobert
Copy link

@danielwrobert danielwrobert commented Jan 10, 2025

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

1 more reviewer

@WooZyCrAsH WooZyCrAsH WooZyCrAsH approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /