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

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

Conversation

iykazrji
Copy link
Collaborator

@iykazrji iykazrji commented Jan 10, 2025

Pull Request Checklist


PR-Codex overview

This PR primarily enhances the OAuth functionality within the account-kit library, introducing new error handling, utility functions, and improved integration with the In-App Browser. It also refines existing components and adds support for new OAuth providers.

Detailed summary

  • Added Buffer polyfill in buffer-polyfill.ts.
  • Introduced resolveRelativeUrl utility function.
  • Enhanced OAuthProvidersError and added InAppBrowserUnavailableError.
  • Implemented oauthWithRedirect and oauthWithPopup methods in RNSignerClient.
  • Updated RNAlchemySigner to include OAuth functionalities.
  • Created OAuthScreen for user authentication via OAuth.
  • Added getOauthProviderUrl utility for generating OAuth URLs.
  • Removed outdated nonce generation logic from oauth.ts.
  • Updated package.json files to include new dependencies and versions.

✨ 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 23, 2025 8:29pm
aa-sdk-ui-demo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 23, 2025 8:29pm

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
@@ -1,2 +1,3 @@
// eslint-disable-next-line import/extensions
/* eslint-disable import/extensions */
Copy link
Collaborator

Choose a reason for hiding this comment

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

we shouldn't be ignoring these. I'm actually shocked it's building with these 🤔

does it not work if these are ... from "./signer.js"

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, so specifying the extension seems to throw Metro off and prevents the example apps from building, hence we removed the extension from this export.

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