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: telegram login #3830

Merged
merged 1 commit into from
Aug 5, 2024
Merged

feat: telegram login #3830

merged 1 commit into from
Aug 5, 2024

Conversation

gregfromstl
Copy link
Member

@gregfromstl gregfromstl commented Jul 26, 2024

TL;DR

This PR introduces support for Telegram OAuth across various components of the thirdweb packages.

What changed?

  • Added 'Telegram' as an OAuth option in WALLETS array within the constants.ts file.
  • Introduced telegramIconUri constant and its usage across the application.
  • Updated socialIcons object and methods to handle new Telegram icon.
  • Enhanced WalletImage components to recognize and display the Telegram icon.
  • Included Telegram in OAuth login path determination within oauthSignIn.ts.
  • Updated enumerations and type definitions to include Telegram.
  • Modified InAppNativeConnector and InAppWebConnector to handle Telegram OAuth redirection.

How to test?

  1. Navigate to the authentication section in the application.
  2. Check for the new 'Sign in with Telegram' option.
  3. Attempt to sign in using a Telegram account and verify the successful login flow.

Why make this change?

To expand the authentication options available to users, providing more flexibility and convenience. Telegram is a popular messaging app, and integrating it as an OAuth option can enhance user experience.



PR-Codex overview

The focus of this PR is to add support for Telegram authentication across different modules.

Detailed summary

  • Added telegram as a social authentication option
  • Included TELEGRAM in OauthOption type
  • Updated various modules to support Telegram authentication
  • Added Telegram icon URIs for different platforms

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

Copy link

vercel bot commented Jul 26, 2024

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

Name Status Preview Comments Updated (UTC)
docs-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 5, 2024 7:54pm
thirdweb_playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 5, 2024 7:54pm
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 5, 2024 7:54pm
wallet-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 5, 2024 7:54pm

Copy link

changeset-bot bot commented Jul 26, 2024

⚠️ No Changeset found

Latest commit: ae28e27

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

Copy link

graphite-app bot commented Jul 26, 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.

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

gregfromstl commented Jul 26, 2024

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

codspeed-hq bot commented Jul 26, 2024

CodSpeed Performance Report

Merging #3830 will not alter performance

Comparing feat/telegram-login (2a3acfa) with main (b0a303d)

Summary

✅ 9 untouched benchmarks

Copy link

codecov bot commented Jul 26, 2024

Codecov Report

Attention: Patch coverage is 50.00000% with 6 lines in your changes missing coverage. Please review.

Project coverage is 60.92%. Comparing base (9640b18) to head (ae28e27).

Files Patch % Lines
...irdweb/src/react/web/ui/components/WalletImage.tsx 25.00% 3 Missing ⚠️
.../web/wallets/shared/ConnectWalletSocialOptions.tsx 0.00% 1 Missing ⚠️
...irdweb/src/react/web/wallets/shared/oauthSignIn.ts 0.00% 1 Missing ⚠️
...irdweb/src/wallets/in-app/web/lib/web-connector.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3830      +/-   ##
==========================================
- Coverage   60.92%   60.92%   -0.01%     
==========================================
  Files         962      962              
  Lines       77531    77543      +12     
  Branches     3680     3678       -2     
==========================================
+ Hits        47237    47243       +6     
- Misses      29613    29619       +6     
  Partials      681      681              
Flag Coverage Δ *Carryforward flag
legacy_packages 65.68% <ø> (ø) Carriedforward from 9640b18
packages 60.14% <50.00%> (-0.01%) ⬇️

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

Files Coverage Δ
...kages/thirdweb/src/react/core/utils/socialIcons.ts 100.00% <100.00%> (ø)
...web/src/wallets/in-app/core/authentication/type.ts 100.00% <100.00%> (ø)
packages/thirdweb/src/wallets/types.ts 100.00% <100.00%> (ø)
.../web/wallets/shared/ConnectWalletSocialOptions.tsx 23.83% <0.00%> (-0.06%) ⬇️
...irdweb/src/react/web/wallets/shared/oauthSignIn.ts 50.00% <0.00%> (-0.35%) ⬇️
...irdweb/src/wallets/in-app/web/lib/web-connector.ts 10.80% <0.00%> (-0.05%) ⬇️
...irdweb/src/react/web/ui/components/WalletImage.tsx 19.62% <25.00%> (+0.13%) ⬆️

Copy link
Contributor

github-actions bot commented Jul 26, 2024

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 43.27 KB (0%) 866 ms (0%) 166 ms (+43.1% 🔺) 1.1 s
thirdweb (cjs) 91.36 KB (0%) 1.9 s (0%) 432 ms (+12.2% 🔺) 2.3 s
thirdweb (minimal + tree-shaking) 4.81 KB (0%) 97 ms (0%) 64 ms (+664.01% 🔺) 160 ms
thirdweb/chains (tree-shaking) 492 B (0%) 10 ms (0%) 13 ms (+428.58% 🔺) 23 ms
thirdweb/react (minimal + tree-shaking) 13.62 KB (0%) 273 ms (0%) 21 ms (+7.82% 🔺) 293 ms

@gregfromstl gregfromstl force-pushed the feat/telegram-login branch from 6fe6d71 to b7271f4 Compare July 26, 2024 22:24
@gregfromstl gregfromstl force-pushed the feat/farcaster-login branch from 187b60e to b0a303d Compare July 27, 2024 06:24
@gregfromstl gregfromstl changed the base branch from feat/farcaster-login to main July 27, 2024 06:40
@gregfromstl gregfromstl force-pushed the feat/telegram-login branch from b7271f4 to 2a3acfa Compare July 27, 2024 06:41
@gregfromstl gregfromstl force-pushed the feat/telegram-login branch from 2a3acfa to 84309b9 Compare August 5, 2024 17:31
@gregfromstl gregfromstl marked this pull request as ready for review August 5, 2024 19:32
@gregfromstl gregfromstl requested a review from MananTank as a code owner August 5, 2024 19:32
Copy link

graphite-app bot commented Aug 5, 2024

Merge activity

@gregfromstl gregfromstl removed the DO NOT MERGE This pull request is still in progress and is not ready to be merged. label Aug 5, 2024 — with Graphite App
## TL;DR

This PR introduces support for Telegram OAuth across various components of the thirdweb packages.

## What changed?

- Added 'Telegram' as an OAuth option in `WALLETS` array within the `constants.ts` file.
- Introduced `telegramIconUri` constant and its usage across the application.
- Updated `socialIcons` object and methods to handle new Telegram icon.
- Enhanced `WalletImage` components to recognize and display the Telegram icon.
- Included Telegram in OAuth login path determination within `oauthSignIn.ts`.
- Updated enumerations and type definitions to include Telegram.
- Modified `InAppNativeConnector` and `InAppWebConnector` to handle Telegram OAuth redirection.

## How to test?

1. Navigate to the authentication section in the application.
2. Check for the new 'Sign in with Telegram' option.
3. Attempt to sign in using a Telegram account and verify the successful login flow.

## Why make this change?

To expand the authentication options available to users, providing more flexibility and convenience. Telegram is a popular messaging app, and integrating it as an OAuth option can enhance user experience.

---

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to add `Telegram` as a supported authentication option across various parts of the application.

### Detailed summary
- Added `Telegram` as an authentication option in various files
- Included `TELEGRAM_ICON` in multiple components
- Updated social icons with `telegramIconUri`

> ✨ 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
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