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

feat: support for gitlab and github and safer token storage #766

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

D-Byte
Copy link

@D-Byte D-Byte commented Dec 16, 2024

Updated version after commit dustinwloring1988:feat/enhanced-github-connection

Schermafbeelding 2024-12-16 101641

Secure Git Credentials Management System

Overview

Implemented a secure credential management system for GitHub and GitLab integrations, featuring encrypted storage and seamless authentication handling.

Key Features

  • Secure encryption using Web Crypto API with AES-GCM
  • Automatic encryption key management without user intervention
  • Support for both GitHub and GitLab credentials
  • Automatic migration from legacy cookie storage
  • Unified interface for managing multiple Git provider credentials
  • Improved error handling and user feedback
  • Clean separation of concerns between UI and credential management

Technical Implementation

  • Uses AES-GCM encryption for secure credential storage
  • Implements automatic key generation and management
  • Stores encrypted credentials in cookies with proper domain isolation
  • Provides fallback and migration from legacy storage formats
  • Handles both GitHub and GitLab API authentication formats
  • Includes comprehensive error handling and user notifications

UI/UX Improvements

  • Clear feedback for authentication states
  • Guided user flow for credential setup
  • Improved error messages and notifications
  • GitHub or GitLab button visible on workbench when credentials are set
  • Streamlined repository creation process

Schermafbeelding 2024-12-16 101729
GitHub setup form

Schermafbeelding 2024-12-16 101740
GitLab setup form

Schermafbeelding 2024-12-16 101749
Only show push to ... button when there are credentials set.

@D-Byte D-Byte changed the title feat: GitLab support and safer token storage also for GitHub feat: support for GitLab and GitHub and safer token storage Dec 17, 2024
@D-Byte D-Byte changed the title feat: support for GitLab and GitHub and safer token storage Support for GitLab and GitHub and safer token storage Dec 17, 2024
@D-Byte D-Byte changed the title Support for GitLab and GitHub and safer token storage feat: Support for GitLab and GitHub and safer token storage Dec 17, 2024
@D-Byte D-Byte changed the title feat: Support for GitLab and GitHub and safer token storage feat: support for gitlab and github and safer token storage Dec 17, 2024
@thecodacus
Copy link
Collaborator

@D-Byte - Great work on this! I noticed you're importing useCredentials in the hooks section, but it's not being used as a hook. To improve the implementation, could you:

Wrap these functions into a custom hook
Use useEffect to initialize the master key within the hook
This way, we avoid redundant

Let me know if you'd like help with the implementation.

@thecodacus thecodacus added enhancement New feature or request ui-enhancement Enhancement made to the UI labels Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request ui-enhancement Enhancement made to the UI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants