Skip to content

Commit 3c12a27

Browse files
committed
chore: cleanly remove apple signup from custodian wallet
1 parent 1925269 commit 3c12a27

7 files changed

Lines changed: 22 additions & 27 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Visit [UTXOS](https://utxos.dev/) for more information.
88

99
- **Multi-Chain Support**: Bitcoin, Cardano, and Spark blockchains
1010
- **Developer-Controlled Wallets**: Manage wallets on behalf of users with secure backend integration
11-
- **User-Controlled Wallets**: Non-custodial wallet solutions with OAuth integration (Google, Twitter, Discord, Apple)
11+
- **User-Controlled Wallets**: Non-custodial wallet solutions with OAuth integration (Google, Twitter, Discord)
1212
- **Transaction Sponsorship**: Sponsor transactions for gasless user experiences
1313
- **Shard-Based Security**: Client-side key management with multi-shard encryption
1414
- **TypeScript Native**: Full type safety and IntelliSense support

examples/nextjs/app/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import type { Metadata } from "next";
22

33
export const metadata: Metadata = {
44
title: "UTXOS Wallet | Web3 Wallet as a Service",
5-
description: "Connect your wallet with social login - Google, Discord, Twitter, Apple, Email",
5+
description: "Connect your wallet with social login Google, Discord, Twitter, Email",
66
};
77

88
export default function RootLayout({

examples/nextjs/app/page.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ const PROVIDERS: { id: Web3AuthProvider; label: string; icon: string }[] = [
2121
{ id: "google", label: "Google", icon: "G" },
2222
{ id: "discord", label: "Discord", icon: "D" },
2323
{ id: "twitter", label: "Twitter", icon: "X" },
24-
{ id: "apple", label: "Apple", icon: "" },
2524
{ id: "email", label: "Email", icon: "@" },
2625
];
2726

examples/react-native/App.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ const PROVIDERS: { id: Web3AuthProvider; label: string; icon: string }[] = [
3232
{ id: "google", label: "Google", icon: "G" },
3333
{ id: "discord", label: "Discord", icon: "D" },
3434
{ id: "twitter", label: "Twitter", icon: "X" },
35-
{ id: "apple", label: "Apple", icon: "" },
3635
{ id: "email", label: "Email", icon: "@" },
3736
];
3837

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@utxos/sdk",
3-
"version": "0.2.1",
3+
"version": "0.2.2",
44
"description": "UTXOS SDK - Web3 infrastructure platform for UTXO blockchains",
55
"main": "./dist/index.cjs",
66
"module": "./dist/index.js",

src/non-custodial/index.ts

Lines changed: 15 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,11 @@ export type Web3NonCustodialProviderParams = {
9999
googleOauth2ClientId: string;
100100
twitterOauth2ClientId: string;
101101
discordOauth2ClientId: string;
102-
appleOauth2ClientId: string;
102+
/**
103+
* @deprecated Apple Sign In was removed. Omit this field. If a non-empty value is passed,
104+
* the constructor throws so misconfiguration is visible immediately instead of failing later.
105+
*/
106+
appleOauth2ClientId?: string;
103107
};
104108

105109
export type Web3NonCustodialProviderUser = {
@@ -178,9 +182,13 @@ export class Web3NonCustodialProvider {
178182
googleOauth2ClientId: string;
179183
twitterOauth2ClientId: string;
180184
discordOauth2ClientId: string;
181-
appleOauth2ClientId: string;
182185

183186
constructor(params: Web3NonCustodialProviderParams) {
187+
if (params.appleOauth2ClientId) {
188+
throw new Error(
189+
"Apple Sign no longer supported in SDK.",
190+
);
191+
}
184192
this.projectId = params.projectId;
185193
this.appOrigin = params.appOrigin ? params.appOrigin : "https://utxos.dev";
186194
this.storageLocation = params.storageLocation
@@ -189,7 +197,6 @@ export class Web3NonCustodialProvider {
189197
this.googleOauth2ClientId = params.googleOauth2ClientId;
190198
this.twitterOauth2ClientId = params.twitterOauth2ClientId;
191199
this.discordOauth2ClientId = params.discordOauth2ClientId;
192-
this.appleOauth2ClientId = params.appleOauth2ClientId;
193200
}
194201

195202
private base64Encode(str: string): string {
@@ -479,6 +486,11 @@ export class Web3NonCustodialProvider {
479486
redirectUrl: string,
480487
callback: (authorizationUrl: string) => void,
481488
) {
489+
if (provider === "apple") {
490+
throw new Error(
491+
"Apple Sign In was removed. Use google, discord, twitter, or email.",
492+
);
493+
}
482494
if (provider === "google") {
483495
const googleState = JSON.stringify({
484496
redirect: redirectUrl,
@@ -536,25 +548,6 @@ export class Web3NonCustodialProvider {
536548
"https://x.com/i/oauth2/authorize?" + twitterSearchParams.toString();
537549
callback(twitterAuthorizeUrl);
538550
return;
539-
} else if (provider === "apple") {
540-
const appleState = JSON.stringify({
541-
redirect: redirectUrl,
542-
provider: "apple",
543-
projectId: this.projectId,
544-
});
545-
const appleSearchParams = new URLSearchParams({
546-
client_id: this.appleOauth2ClientId,
547-
response_type: "code",
548-
redirect_uri: this.appOrigin + "/api/auth",
549-
response_mode: "form_post",
550-
scope: "name email",
551-
state: this.base64Encode(appleState),
552-
});
553-
const appleAuthorizeUrl =
554-
"https://appleid.apple.com/auth/authorize?" +
555-
appleSearchParams.toString();
556-
callback(appleAuthorizeUrl);
557-
return;
558551
} else if (provider === "email") {
559552
// Email uses OTP flow, not OAuth - this method should not be called for email
560553
throw new Error("Email provider uses OTP flow. Use the email OTP API endpoints instead.");

src/types/core/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ export type Web3ProjectBranding = {
2424
twitterEnabled?: boolean;
2525
discordEnabled?: boolean;
2626
googleEnabled?: boolean;
27+
/**
28+
* Present on legacy API payloads. Apple Sign In is no longer offered; safe to ignore in UI.
29+
* @deprecated
30+
*/
2731
appleEnabled?: boolean;
2832
emailEnabled?: boolean;
2933
};

0 commit comments

Comments
 (0)