Skip to content

Commit 3c3f7c4

Browse files
Temasar1jinglescode
authored andcommitted
chore: cleanly remove apple signup from custodian wallet
1 parent 9b1a1d7 commit 3c3f7c4

8 files changed

Lines changed: 24 additions & 30 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.3",
3+
"version": "0.2.4",
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
@@ -104,7 +104,11 @@ export type Web3NonCustodialProviderParams = {
104104
googleOauth2ClientId: string;
105105
twitterOauth2ClientId: string;
106106
discordOauth2ClientId: string;
107-
appleOauth2ClientId: string;
107+
/**
108+
* @deprecated Apple Sign In was removed. Omit this field. If a non-empty value is passed,
109+
* the constructor throws so misconfiguration is visible immediately instead of failing later.
110+
*/
111+
appleOauth2ClientId?: string;
108112
};
109113

110114
export type Web3NonCustodialProviderUser = {
@@ -183,9 +187,13 @@ export class Web3NonCustodialProvider {
183187
googleOauth2ClientId: string;
184188
twitterOauth2ClientId: string;
185189
discordOauth2ClientId: string;
186-
appleOauth2ClientId: string;
187190

188191
constructor(params: Web3NonCustodialProviderParams) {
192+
if (params.appleOauth2ClientId) {
193+
throw new Error(
194+
"Apple Sign no longer supported in SDK.",
195+
);
196+
}
189197
this.projectId = params.projectId;
190198
this.appOrigin = params.appOrigin ? params.appOrigin : "https://utxos.dev";
191199
this.storageLocation = params.storageLocation
@@ -194,7 +202,6 @@ export class Web3NonCustodialProvider {
194202
this.googleOauth2ClientId = params.googleOauth2ClientId;
195203
this.twitterOauth2ClientId = params.twitterOauth2ClientId;
196204
this.discordOauth2ClientId = params.discordOauth2ClientId;
197-
this.appleOauth2ClientId = params.appleOauth2ClientId;
198205
}
199206

200207
private base64Encode(str: string): string {
@@ -492,6 +499,11 @@ export class Web3NonCustodialProvider {
492499
redirectUrl: string,
493500
callback: (authorizationUrl: string) => void,
494501
) {
502+
if ((provider as string) === "apple") {
503+
throw new Error(
504+
"Apple Sign In was removed. Use google, discord, twitter, or email.",
505+
);
506+
}
495507
if (provider === "google") {
496508
const googleState = JSON.stringify({
497509
redirect: redirectUrl,
@@ -549,25 +561,6 @@ export class Web3NonCustodialProvider {
549561
"https://x.com/i/oauth2/authorize?" + twitterSearchParams.toString();
550562
callback(twitterAuthorizeUrl);
551563
return;
552-
} else if (provider === "apple") {
553-
const appleState = JSON.stringify({
554-
redirect: redirectUrl,
555-
provider: "apple",
556-
projectId: this.projectId,
557-
});
558-
const appleSearchParams = new URLSearchParams({
559-
client_id: this.appleOauth2ClientId,
560-
response_type: "code",
561-
redirect_uri: this.appOrigin + "/api/auth",
562-
response_mode: "form_post",
563-
scope: "name email",
564-
state: this.base64Encode(appleState),
565-
});
566-
const appleAuthorizeUrl =
567-
"https://appleid.apple.com/auth/authorize?" +
568-
appleSearchParams.toString();
569-
callback(appleAuthorizeUrl);
570-
return;
571564
} else if (provider === "email") {
572565
// Email uses OTP flow, not OAuth - this method should not be called for email
573566
throw new Error("Email provider uses OTP flow. Use the email OTP API endpoints instead.");

src/types/core/index.ts

Lines changed: 5 additions & 1 deletion
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
};
@@ -58,7 +62,7 @@ export type Web3JWTBody = {
5862
username: string | null;
5963
};
6064

61-
export type Web3AuthProvider = "google" | "discord" | "twitter" | "apple" | "email";
65+
export type Web3AuthProvider = "google" | "discord" | "twitter" | "email";
6266

6367
/** Role a user can have within a project */
6468
export type Web3ProjectRole = "owner" | "admin" | "developer" | "billing";

src/wallet-user-controlled/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,4 @@ export * from "./web3-wallet";
33
export type UserControlledWalletDirectTo =
44
| "google"
55
| "twitter"
6-
| "discord"
7-
| "apple";
6+
| "discord";

0 commit comments

Comments
 (0)