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: use apiKey instead of jwt for requests #98

Merged
merged 6 commits into from
Mar 27, 2025
Merged

feat: use apiKey instead of jwt for requests #98

merged 6 commits into from
Mar 27, 2025

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

@Copilot Copilot bot review requested due to automatic review settings March 19, 2025 21:28
@kristencheung kristencheung requested a review from a team as a code owner March 19, 2025 21:28
Copy link

@Copilot 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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants