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(thirdweb): adds redirect oauth #3822

Merged
merged 1 commit into from
Jul 25, 2024
Merged

feat(thirdweb): adds redirect oauth #3822

merged 1 commit into from
Jul 25, 2024

Conversation

gregfromstl
Copy link
Member

@gregfromstl gregfromstl commented Jul 25, 2024

TL;DR

Added support for OAuth redirects in the In-App wallet authentication flow.

What changed?

  1. Introduced auth.mode with options `


PR-Codex overview

This PR adds the ability to open OAuth windows as a redirect, useful for embedded applications. It includes changes in redirect mode, OAuth handling, and social login.

Detailed summary

  • Added mode: "redirect" option for OAuth windows
  • Updated OAuth handling in various wallet-related files
  • Implemented loginWithOauthRedirect function for social login
  • Updated authentication flow with redirect options

The following files were skipped due to too many changes: packages/thirdweb/src/react/core/hooks/wallets/useAutoConnect.ts, packages/thirdweb/src/wallets/in-app/web/lib/web-connector.ts

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

Copy link

vercel bot commented Jul 25, 2024

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

Name Status Preview Comments Updated (UTC)
thirdweb_playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 25, 2024 11:47pm
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 25, 2024 11:47pm
wallet-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 25, 2024 11:47pm

Copy link

changeset-bot bot commented Jul 25, 2024

🦋 Changeset detected

Latest commit: 3848327

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
thirdweb Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added Playground Changes involving the Playground codebase. TS SDK Involves changes to the v5 TypeScript SDK. labels Jul 25, 2024
Copy link
Member Author

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

Join @gregfromstl and the rest of your teammates on Graphite Graphite

Copy link

graphite-app bot commented Jul 25, 2024

Your org requires the Graphite merge queue for merging into main

Add the label “merge-queue” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix.

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

Copy link

codspeed-hq bot commented Jul 25, 2024

CodSpeed Performance Report

Merging #3822 will not alter performance

Comparing feat/oauth-redirect (3848327) with main (bff7a0a)

Summary

✅ 9 untouched benchmarks

Copy link
Contributor

github-actions bot commented Jul 25, 2024

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 43.17 KB (0%) 864 ms (0%) 3.2 s (-7.83% 🔽) 4 s
thirdweb (cjs) 91.22 KB (0%) 1.9 s (0%) 8 s (+2.82% 🔺) 9.8 s
thirdweb (minimal + tree-shaking) 4.79 KB (0%) 96 ms (0%) 229 ms (+66.14% 🔺) 325 ms
thirdweb/chains (tree-shaking) 492 B (0%) 10 ms (0%) 89 ms (+62.35% 🔺) 99 ms
thirdweb/react (minimal + tree-shaking) 13.54 KB (0%) 271 ms (0%) 823 ms (+24.31% 🔺) 1.1 s

Copy link

codecov bot commented Jul 25, 2024

Codecov Report

Attention: Patch coverage is 31.54762% with 115 lines in your changes missing coverage. Please review.

Project coverage is 61.99%. Comparing base (bff7a0a) to head (3848327).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3822      +/-   ##
==========================================
- Coverage   62.32%   61.99%   -0.34%     
==========================================
  Files         963      967       +4     
  Lines       74813    75366     +553     
  Branches     3772     3775       +3     
==========================================
+ Hits        46630    46720      +90     
- Misses      27498    27961     +463     
  Partials      685      685              
Flag Coverage Δ *Carryforward flag
legacy_packages 65.68% <ø> (ø) Carriedforward from bff7a0a
packages 61.36% <31.54%> (-0.40%) ⬇️

*This pull request uses carry forward flags. Click here to find out more.

Files Coverage Δ
...irdweb/src/react/web/wallets/shared/oauthSignIn.ts 50.70% <100.00%> (ø)
packages/thirdweb/src/wallets/in-app/web/in-app.ts 93.75% <100.00%> (+0.89%) ⬆️
.../thirdweb/src/wallets/in-app/web/lib/auth/oauth.ts 10.00% <16.66%> (ø)
...web/src/react/core/hooks/wallets/useAutoConnect.ts 57.69% <35.29%> (-3.52%) ⬇️
.../thirdweb/src/wallets/in-app/web/lib/auth/index.ts 60.86% <14.28%> (-3.80%) ⬇️
...irdweb/src/wallets/in-app/web/lib/get-url-token.ts 58.33% <58.33%> (ø)
...irdweb/src/wallets/in-app/web/lib/web-connector.ts 11.29% <16.66%> (+0.17%) ⬆️
.../web/wallets/shared/ConnectWalletSocialOptions.tsx 24.43% <11.11%> (-0.64%) ⬇️
...rdweb/src/react/web/wallets/shared/SocialLogin.tsx 12.50% <10.00%> (-0.80%) ⬇️
...s/thirdweb/src/wallets/in-app/core/wallet/index.ts 26.20% <18.18%> (-1.44%) ⬇️

... and 2 files with indirect coverage changes

Copy link

graphite-app bot commented Jul 25, 2024

Merge activity

### TL;DR

Added support for OAuth redirects in the In-App wallet authentication flow.

### What changed?

1. Introduced `auth.mode` with options `

---

<!-- start pr-codex -->

---

## PR-Codex overview
This PR introduces the ability to open OAuth windows as a redirect, beneficial for embedded applications like Telegram web apps.

### Detailed summary
- Added `mode: "redirect"` option for OAuth windows
- Implemented functions for OAuth redirection
- Updated authentication options for in-app wallets

> The following files were skipped due to too many changes: `packages/thirdweb/src/react/core/hooks/wallets/useAutoConnect.ts`, `packages/thirdweb/src/wallets/in-app/web/lib/web-connector.ts`

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

<!-- end pr-codex -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DO NOT MERGE This pull request is still in progress and is not ready to be merged. Playground Changes involving the Playground codebase. TS SDK Involves changes to the v5 TypeScript SDK.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants