Skip to content

Commit

Permalink
[SDK] Feature: Steam Auth (#5415)
Browse files Browse the repository at this point in the history
CNCT-2198

<!-- start pr-codex -->

---

## PR-Codex overview
This PR introduces `Steam` as a new authentication option across various components and files, enhancing the authentication capabilities of the application.

### Detailed summary
- Added `Steam` as an authentication option in multiple files.
- Updated `types.ts` and `oauthSignIn.ts` to include `Steam`.
- Added `STEAM_ICON` in `svgs.ts` for UI representation.
- Updated connection options in `ConnectWalletMiniPlayground.tsx`.
- Modified documentation to include `Steam` in social logins.

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

<!-- end pr-codex -->
  • Loading branch information
gregfromstl committed Nov 15, 2024
1 parent f7a4a46 commit 7b21f1b
Show file tree
Hide file tree
Showing 18 changed files with 37 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .changeset/dirty-cups-tickle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"thirdweb": minor
---

Adds steam auth
5 changes: 5 additions & 0 deletions .changeset/small-eagles-cry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"thirdweb": minor
---

Adds Steam as an authentication option
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export const authOptions = [
"telegram",
"github",
"twitch",
"steam",
"apple",
"coinbase",
"line",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ function usePlaygroundWallets() {
passkey: true,
phone: true,
twitch: false,
steam: false,
facebook: false,
apple: false,
github: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const allInAppWalletLoginMethods: InAppWalletAuth[] = [
"telegram",
"github",
"twitch",
"steam",
"farcaster",
"email",
"passkey",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Create an instance of `EcosystemWallet` using a user's email, phone number or OA
Ecosystem Wallets support a variety of login methods:
- Email (OTP Login)
- Phone (OTP Login)
- Socials (Google, Apple, Facebook, Telegram, Farcaster, Line, Github, Twitch etc.)
- Socials (Google, Apple, Facebook, Telegram, Farcaster, Line, Github, Twitch, Steam, etc.)
- SIWE (Sign-In with Ethereum)
- Custom Auth (OIDC Compatible)
- Custom Auth (Generic Auth Endpoint)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Ecosystem Wallets have a very similar API to the [In-App Wallet](/unity/v5/walle
Ecosystem Wallets support a variety of login methods:
- Email (OTP Login)
- Phone (OTP Login)
- Socials (Google, Apple, Facebook, Telegram, Farcaster, Line, Github, Twitch etc.)
- Socials (Google, Apple, Facebook, Telegram, Farcaster, Line, Github, Twitch, Steam, etc.)
- SIWE (Sign-In with Ethereum)
- Custom Auth (OIDC Compatible)
- Custom Auth (Generic Auth Endpoint)
Expand Down Expand Up @@ -167,4 +167,4 @@ List<LinkedAccount> linkedAccounts = await mainEcosystemWallet.GetLinkedAccounts
href="/dotnet/wallets/providers/ecosystem-wallet"
icon={GraduationCap}
title="Learn more about EcosystemWallet"
/>
/>
4 changes: 2 additions & 2 deletions apps/portal/src/app/unity/v5/wallets/in-app-wallet/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ It makes for a fantastic [SmartWallet](/unity/v5/wallets/account-abstraction) ad
In-App Wallets support a variety of login methods:
- Email (OTP Login)
- Phone (OTP Login)
- Socials (Google, Apple, Facebook, Telegram, Farcaster, Line, Github, Twitch etc.)
- Socials (Google, Apple, Facebook, Telegram, Farcaster, Line, Github, Twitch, Steam, etc.)
- SIWE (Sign-In with Ethereum)
- Custom Auth (OIDC Compatible)
- Custom Auth (Generic Auth Endpoint)
Expand Down Expand Up @@ -147,4 +147,4 @@ List<LinkedAccount> linkedAccounts = await mainInAppWallet.GetLinkedAccounts();
href="/dotnet/wallets/providers/in-app-wallet"
icon={GraduationCap}
title="Learn more about InAppWallet"
/>
/>
5 changes: 5 additions & 0 deletions packages/thirdweb/src/react/core/utils/walletIcon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 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OUM4My45OTQgNjkuNTE0IDcyLjU5IDczLjY2OSA2MS42NyA3NC44OTJDNjMuNDUgNzYuNDQgNjQuOTg2IDc5LjM3MyA2NC45ODYgODQuMDE4QzY0Ljk4NiA5MC42MTggNjQuOTA2IDk1LjkxNSA2NC45MDYgOTcuNTQ0QzY0LjkwNiA5OC44NDggNjUuNzk2IDEwMC4zOTcgNjguMjIyIDk5LjkwOEM4Ny42MzQgOTMuMzg4IDEwMS42MjcgNzQuOTczIDEwMS42MjcgNTMuMjE3QzEwMS43MDcgMjYgNzkuNzg4IDQgNTIuODU0IDRaIiBmaWxsPSIjMjQyOTJGIi8+Cjwvc3ZnPgo=";
const xIcon =
Expand Down Expand Up @@ -48,6 +50,7 @@ export const socialIcons = {
telegram: telegramIconUri,
twitch: twitchIconUri,
github: githubIconUri,
steam: steamIconUri,
};

/**
Expand Down Expand Up @@ -90,6 +93,8 @@ export function getSocialIcon(provider: AuthOption | ({} & string)): string {
return twitchIconUri;
case "github":
return githubIconUri;
case "steam":
return steamIconUri;

Check warning on line 97 in packages/thirdweb/src/react/core/utils/walletIcon.ts

View check run for this annotation

Codecov / codecov/patch

packages/thirdweb/src/react/core/utils/walletIcon.ts#L96-L97

Added lines #L96 - L97 were not covered by tests
case "guest":
return guestIcon;
default:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import {
LINE_ICON,
PASSKEY_ICON,
PHONE_ICON,
STEAM_ICON,
TELEGRAM_ICON,
TWITCH_ICON,
WALLET_ICON,
Expand Down Expand Up @@ -110,6 +111,8 @@ export function getAuthProviderImage(authProvider: string | null): string {
return GITHUB_ICON;
case "twitch":
return TWITCH_ICON;
case "steam":
return STEAM_ICON;
case "guest":
return GUEST_ICON;
default:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import {
GITHUB_ICON,
GOOGLE_ICON,
LINE_ICON,
STEAM_ICON,
TELEGRAM_ICON,
TWITCH_ICON,
X_ICON,
Expand Down Expand Up @@ -65,6 +66,7 @@ const socialIcons = {
telegram: TELEGRAM_ICON,
github: GITHUB_ICON,
twitch: TWITCH_ICON,
steam: STEAM_ICON,
};

type InAppWalletFormUIProps = {
Expand Down
2 changes: 2 additions & 0 deletions packages/thirdweb/src/react/native/ui/icons/svgs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ export const GITHUB_ICON = `<svg width="106" height="106" viewBox="0 0 106 106"
<path fill-rule="evenodd" clip-rule="evenodd" d="M52.854 4C25.839 4 4 26 4 53.217C4 74.973 17.993 93.389 37.405 99.907C39.832 100.397 40.721 98.848 40.721 97.545C40.721 96.404 40.641 92.493 40.641 88.418C27.051 91.352 24.221 82.551 24.221 82.551C22.037 76.847 18.801 75.381 18.801 75.381C14.353 72.366 19.125 72.366 19.125 72.366C24.059 72.692 26.648 77.418 26.648 77.418C31.015 84.914 38.052 82.796 40.883 81.492C41.287 78.314 42.582 76.114 43.957 74.892C33.118 73.751 21.714 69.514 21.714 50.609C21.714 45.231 23.654 40.831 26.728 37.409C26.243 36.187 24.544 31.134 27.214 24.371C27.214 24.371 31.339 23.067 40.64 29.423C44.6221 28.3457 48.7288 27.7976 52.854 27.793C56.979 27.793 61.184 28.364 65.067 29.423C74.369 23.067 78.494 24.371 78.494 24.371C81.164 31.134 79.464 36.187 78.979 37.409C82.134 40.831 83.994 45.231 83.994 50.609C83.994 69.514 72.59 73.669 61.67 74.892C63.45 76.44 64.986 79.373 64.986 84.018C64.986 90.618 64.906 95.915 64.906 97.544C64.906 98.848 65.796 100.397 68.222 99.908C87.634 93.388 101.627 74.973 101.627 53.217C101.707 26 79.788 4 52.854 4Z" fill="#24292F"/>
</svg>`;

export const STEAM_ICON = `<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 65 65" fill="#fff"><use xlink:href="#B" x=".5" y=".5"/><defs><linearGradient id="A" x2="50%" x1="50%" y2="100%" y1="0%"><stop stop-color="#111d2e" offset="0%"/><stop stop-color="#051839" offset="21.2%"/><stop stop-color="#0a1b48" offset="40.7%"/><stop stop-color="#132e62" offset="58.1%"/><stop stop-color="#144b7e" offset="73.8%"/><stop stop-color="#136497" offset="87.3%"/><stop stop-color="#1387b8" offset="100%"/></linearGradient></defs><symbol id="B"><g><path d="M1.305 41.202C5.259 54.386 17.488 64 31.959 64c17.673 0 32-14.327 32-32s-14.327-32-32-32C15.001 0 1.124 13.193.028 29.874c2.074 3.477 2.879 5.628 1.275 11.328z" fill="url(#A)"/><path d="M30.31 23.985l.003.158-7.83 11.375c-1.268-.058-2.54.165-3.748.662a8.14 8.14 0 0 0-1.498.8L.042 29.893s-.398 6.546 1.26 11.424l12.156 5.016c.6 2.728 2.48 5.12 5.242 6.27a8.88 8.88 0 0 0 11.603-4.782 8.89 8.89 0 0 0 .684-3.656L42.18 36.16l.275.005c6.705 0 12.155-5.466 12.155-12.18s-5.44-12.16-12.155-12.174c-6.702 0-12.155 5.46-12.155 12.174zm-1.88 23.05c-1.454 3.5-5.466 5.147-8.953 3.694a6.84 6.84 0 0 1-3.524-3.362l3.957 1.64a5.04 5.04 0 0 0 6.591-2.719 5.05 5.05 0 0 0-2.715-6.601l-4.1-1.695c1.578-.6 3.372-.62 5.05.077 1.7.703 3 2.027 3.696 3.72s.692 3.56-.01 5.246M42.466 32.1a8.12 8.12 0 0 1-8.098-8.113 8.12 8.12 0 0 1 8.098-8.111 8.12 8.12 0 0 1 8.1 8.111 8.12 8.12 0 0 1-8.1 8.113m-6.068-8.126a6.09 6.09 0 0 1 6.08-6.095c3.355 0 6.084 2.73 6.084 6.095a6.09 6.09 0 0 1-6.084 6.093 6.09 6.09 0 0 1-6.081-6.093z"/></g></symbol></svg>`;

export const TWITCH_ICON = `<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 2400 2800" style="enable-background:new 0 0 2400 2800;" xml:space="preserve">
<style type="text/css">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ export const ConnectWalletSocialOptions = (
telegram: "Telegram",
github: "GitHub",
twitch: "Twitch",
steam: "Steam",

Check warning on line 120 in packages/thirdweb/src/react/web/wallets/shared/ConnectWalletSocialOptions.tsx

View check run for this annotation

Codecov / codecov/patch

packages/thirdweb/src/react/web/wallets/shared/ConnectWalletSocialOptions.tsx#L120

Added line #L120 was not covered by tests
};

const { data: ecosystemAuthOptions, isLoading } = useQuery({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export function SocialLogin(props: {
) {
setAuthError(ewLocale.maxAccountsExceeded);
}
console.error(`Error sign in with ${props.socialAuth}`, e);
console.error(`Error signing in with ${props.socialAuth}`, e);

Check warning on line 128 in packages/thirdweb/src/react/web/wallets/shared/SocialLogin.tsx

View check run for this annotation

Codecov / codecov/patch

packages/thirdweb/src/react/web/wallets/shared/SocialLogin.tsx#L128

Added line #L128 was not covered by tests
}
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ function getOauthLoginPath(
case "telegram":
case "github":
case "twitch":
case "steam":

Check warning on line 43 in packages/thirdweb/src/react/web/wallets/shared/oauthSignIn.ts

View check run for this annotation

Codecov / codecov/patch

packages/thirdweb/src/react/web/wallets/shared/oauthSignIn.ts#L43

Added line #L43 was not covered by tests
case "line":
case "x":
case "guest":
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ export type AuthProvider =
| "X"
| "Line"
| "Twitch"
| "Steam"
| "GitHub"
| "Farcaster"
| "Telegram";
Expand Down
2 changes: 2 additions & 0 deletions packages/thirdweb/src/wallets/in-app/web/lib/web-connector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,7 @@ export class InAppWebConnector implements InAppConnector {
case "farcaster":
case "line":
case "x":
case "steam":

Check warning on line 334 in packages/thirdweb/src/wallets/in-app/web/lib/web-connector.ts

View check run for this annotation

Codecov / codecov/patch

packages/thirdweb/src/wallets/in-app/web/lib/web-connector.ts#L334

Added line #L334 was not covered by tests
case "coinbase":
case "discord": {
return loginWithOauth({
Expand Down Expand Up @@ -398,6 +399,7 @@ export class InAppWebConnector implements InAppConnector {
case "guest":
case "coinbase":
case "twitch":
case "steam":

Check warning on line 402 in packages/thirdweb/src/wallets/in-app/web/lib/web-connector.ts

View check run for this annotation

Codecov / codecov/patch

packages/thirdweb/src/wallets/in-app/web/lib/web-connector.ts#L402

Added line #L402 was not covered by tests
case "discord": {
const authToken = await this.authenticate(args);
return await this.auth.loginWithAuthToken(authToken);
Expand Down
1 change: 1 addition & 0 deletions packages/thirdweb/src/wallets/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export const socialAuthOptions = [
"telegram",
"github",
"twitch",
"steam",
] as const;
export type SocialAuthOption = (typeof socialAuthOptions)[number];
export type OAuthOption = SocialAuthOption | "guest";
Expand Down

0 comments on commit 7b21f1b

Please sign in to comment.