Skip to content
This repository was archived by the owner on Aug 21, 2025. It is now read-only.

Conversation

@kristencheung
Copy link
Contributor

Description

Use api keys instead of jwt token

TODO: swap localhost with hypermode urls

Checklist

  • Code compiles correctly and linting passes locally
  • Tests added for new functionality, or regression tests for bug fixes added as applicable
  • For new features, etc., PR on docs repo staged and
    linked here

@kristencheung kristencheung requested review from a team and Copilot March 19, 2025 21:28
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.

Pull Request Overview

This PR transitions authentication from using JWT tokens to API keys, modifying the login flow, GraphQL utility functions, and settings file storage accordingly.

  • Updated login flow to create and use an API key instead of a JWT.
  • Refactored GraphQL request functions to accept API keys and updated endpoint URLs.
  • Modified settings file functions to store API keys rather than JWT tokens.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
src/commands/login/index.ts Changed login URL, added API key creation and validation, and updated settings writing.
src/util/graphql.ts Updated GraphQL functions to use API keys in headers and modified endpoint URLs.
src/util/index.ts Updated writeToSettingsFile to store API key instead of JWT in settings.

@octref octref enabled auto-merge (squash) March 27, 2025 01:52
@octref octref merged commit 1ffb0ed into main Mar 27, 2025
4 checks passed
@octref octref deleted the use-api-key branch March 27, 2025 01:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants