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: add email OTP support #1163

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

feat: add email OTP support #1163

wants to merge 1 commit into from

Conversation

dphilipson
Copy link
Contributor

@dphilipson dphilipson commented Nov 19, 2024

Pull Request Checklist


PR-Codex overview

This PR introduces support for One-Time Password (OTP) authentication in the account kit. It expands existing types and interfaces, modifies authentication flows, and adds new components for handling OTP verification.

Detailed summary

  • Updated Session type to include otp.
  • Added AWAITING_OTP_AUTH status.
  • Modified assertNever function to accept additional parameters.
  • Enhanced authType in metrics to include otp.
  • Updated authentication steps to handle otp_verify.
  • Introduced OtpParams type for OTP requests.
  • Added submitOtpCode method in AlchemySignerWebClient.
  • Created LoadingOtp and CompletingOtpAuth components for OTP flow.
  • Updated error handling and connection messages to include OTP.
  • Adjusted session management to accommodate OTP sessions.

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

Copy link

vercel bot commented Nov 19, 2024

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

Name Status Preview Comments Updated (UTC)
aa-sdk-site ❌ Failed (Inspect) Nov 22, 2024 4:29pm
aa-sdk-ui-demo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 22, 2024 4:29pm

Copy link

graphite-app bot commented Nov 19, 2024

Your org has enabled the Graphite merge queue for merging into main

Add the label “graphite-merge-queue” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge.

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

);
// Helper type to ensure that a listener is either defined or explicitly
// omitted for every event type.
type Listeners = {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@moldy530 I kept forgetting to add listeners for new events I added so I changed this so the type system would help. Style question: do you prefer using undefined for events where we don't want a listener, or the noop function () => {}?

@dphilipson
Copy link
Contributor Author

In draft mode because we don't have final designs (and also the backend isn't done yet).

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.

1 participant