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

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from
Draft

Conversation

iykazrji
Copy link
Collaborator

@iykazrji iykazrji commented Jan 10, 2025

Pull Request Checklist


PR-Codex overview

This PR primarily enhances the rn-signer library by introducing OAuth functionality, improving buffer handling, and adding utility functions for deep linking and URL parameter parsing. It also updates the structure of the RNAlchemySigner class and adds new screens for authentication.

Detailed summary

  • Added Buffer polyfill in buffer-polyfill.ts.
  • Updated RNAlchemySigner with OAuth capabilities.
  • Introduced OAuthScreen for OAuth authentication.
  • Added getDeepLink and base64UrlEncode utilities.
  • Enhanced RNSignerClient with OAuth methods and error handling.
  • Improved URL parameter parsing with parseSearchParams.
  • Updated package.json to include new dependencies.

✨ 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 15, 2025 0:30am
aa-sdk-ui-demo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 15, 2025 0:30am

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
Comment on lines +156 to +157
if (await InAppBrowser.isAvailable()) {
const res = await InAppBrowser.openAuth(providerUrl, redirectUrl);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We actually can await the result of the redirect operation and use it to complete the auth instead of calling authenticate(type: "oauthReturn").

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