Skip to content

Conversation

Copy link

Copilot AI commented Dec 24, 2025

Adds PAT authentication as an alternative to GitHub OAuth for users who prefer token-based login or need to bypass OAuth restrictions.

Changes

views/TokenGate.tsx

  • Added toggle UI to switch between OAuth and PAT authentication methods
  • Implemented PAT input form with validation and error handling
  • Added direct link to GitHub token creation with pre-selected scopes (repo, read:user)
  • Supports Enter key submission and proper state cleanup on method switching

UI

Initial login with both authentication options:
Login Screen

PAT input form:
PAT Input

Implementation

PAT authentication reuses the existing validateToken() flow - no changes needed to the GitHub service or storage layer. Both OAuth and PAT tokens are stored identically in localStorage and validated against the same GitHub API endpoint.

const handlePatLogin = async () => {
  if (!patToken.trim()) {
    setError('Please enter a Personal Access Token');
    return;
  }
  
  const user = await validateToken(patToken.trim());
  onSuccess(patToken.trim(), user);
};
Original prompt

This section details on the original issue you should resolve

<issue_title>add support to login with PAT</issue_title>
<issue_description></issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI self-assigned this Dec 24, 2025
Co-authored-by: friuns <7095563+friuns@users.noreply.github.com>
Copilot AI changed the title [WIP] Add support to login with personal access token Add Personal Access Token authentication Dec 24, 2025
Copilot AI requested a review from friuns December 24, 2025 04:04
@github-actions github-actions bot temporarily deployed to commit December 24, 2025 04:14 Inactive
@github-actions
Copy link

🚀 Netlify Deployment

Deploy URL: https://694b68a87a5169a02c6a8905--my-test-site3.netlify.app

Branch: copilot/add-support-to-login-with-pat
Commit: 8fbb8f8

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.

add support to login with PAT

2 participants