Skip to content

feat: add jwt as auth method #1474

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

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

Conversation

archit2407
Copy link
Contributor

@archit2407 archit2407 commented Mar 20, 2025

Pull Request Checklist


PR-Codex overview

This PR updates the version of multiple packages to 4.18.0-alpha.4 and introduces a new authentication method using JWT in the AlchemySignerWebClient. It also expands type definitions and enhances session management.

Detailed summary

  • Updated version from 4.17.0 to 4.18.0-alpha.4 across multiple packages.
  • Added submitJwt method to AlchemySignerWebClient for JWT authentication.
  • Introduced JwtParams and JwtResponse types for the new authentication method.
  • Expanded Session type to include custom-jwt.
  • Enhanced session management with JWT support in SessionManager.
  • Updated changelogs for all affected packages.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Copy link

vercel bot commented Mar 20, 2025

@archit2407 is attempting to deploy a commit to the Alchemy Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

graphite-app bot commented Mar 20, 2025

How to use the Graphite Merge Queue

Add the label graphite-merge-queue to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

Copy link

vercel bot commented Mar 20, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
aa-sdk-site ❌ Failed (Inspect) Mar 24, 2025 7:38pm
aa-sdk-ui-demo ❌ Failed (Inspect) Mar 24, 2025 7:38pm

dphilipson
dphilipson previously approved these changes Mar 20, 2025
Copy link
Contributor

@dphilipson dphilipson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

jwt: args.jwt,
targetPublicKey,
authProvider: args.authProvider,
});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't necessarily a problem to solve in this PR, but I'm feeling there's a fair bit of code duplication between the react native and web signer clients. The implementation of submitJwt here in the web client is identical to the implementation in the react native client, except for changing this.stamper.init() to this.initIFrameStamper(), and this holds for some of the other methods in these files as well. Could be a good cleanup to do later. cc @moldy530 in case I'm missing something about this.

Copy link
Contributor Author

@archit2407 archit2407 Mar 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is absolutely true. A lot of room for creating helpers in base and use it both places. But as you said lets tackle that in a separate PR so we're able to do it for all other methods too

@archit2407 archit2407 requested a review from howydev as a code owner March 24, 2025 19:12
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.

2 participants