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 oauth support to react native signer #1273

Merged
merged 27 commits into from
Jan 24, 2025
Merged

feat: add oauth support to react native signer #1273

merged 27 commits into from
Jan 24, 2025

Conversation

iykazrji
Copy link
Collaborator

@iykazrji iykazrji commented Jan 10, 2025

Pull Request Checklist


PR-Codex overview

This PR focuses on enhancing the OAuth functionality in the account-kit library, adding new error handling, utility functions, and improving the overall structure of the codebase for better maintainability and usability.

Detailed summary

  • Introduced OAuthProvidersError and InAppBrowserUnavailableError for error handling.
  • Added resolveRelativeUrl utility function.
  • Enhanced oauthWithRedirect and oauthWithPopup methods in RNSignerClient.
  • Updated RNAlchemySigner to export RNAlchemySignerType.
  • Added parseSearchParams utility function.
  • Improved base64UrlEncode utility function.
  • Added addOpenIdIfAbsent utility function to ensure "openid" scope.
  • Updated getOauthProviderUrl method in BaseSignerClient for better OAuth provider handling.
  • Refactored MagicLinkAuthScreen and OTPAuthScreen to use the new signer instance.
  • Introduced OAuthScreen for OAuth authentication.
  • Updated tsconfig.json to allow importing TypeScript extensions.

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

Copy link

vercel bot commented Jan 10, 2025

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

Name Status Preview Comments Updated (UTC)
aa-sdk-site ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 24, 2025 4:47pm
aa-sdk-ui-demo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 24, 2025 4:47pm

Copy link
Collaborator Author


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.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@iykazrji iykazrji marked this pull request as draft January 10, 2025 22:25
@iykazrji iykazrji changed the title chore: add PR step for validating iOS builds (#1266) feat: add oauth support to react native signer Jan 10, 2025
account-kit/rn-signer/src/oauth.ts Outdated Show resolved Hide resolved
account-kit/rn-signer/src/errors.ts Outdated Show resolved Hide resolved
Copy link
Collaborator

@moldy530 moldy530 left a comment

Choose a reason for hiding this comment

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

couple small comments, but generally LGTM

account-kit/rn-signer/src/client.ts Outdated Show resolved Hide resolved
account-kit/rn-signer/src/client.ts Outdated Show resolved Hide resolved
account-kit/rn-signer/src/client.ts Show resolved Hide resolved
account-kit/rn-signer/src/index.tsx Outdated Show resolved Hide resolved
import { http } from "viem";

const client = createSmartAccountClient({
transport: http("rpc-url"),
chain: sepolia,
...alchemyGasManagerMiddleware("policyId"),
Copy link
Collaborator

Choose a reason for hiding this comment

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

odd... this probably shouldn't have changed, I wonder what happened here?

oos for this though

moldy530
moldy530 previously approved these changes Jan 24, 2025
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.

3 participants