disable apple for non-custodian wallet auth#129
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Removes Apple Sign In from the SDK's non-custodial OAuth surface.
Breaking changes
This is a breaking change. SDK bumps to 0.2.4. There are three vectors — only the third requires actually calling sign-in:
appleOauth2ClientIdtonew Web3NonCustodialProvider({...})will throw at construction time. Apps with Apple configured will fail to boot until the field is removed."apple"is removed fromWeb3AuthProviderandUserControlledWalletDirectTo. Any code referencing"apple"as a value of these types failstsc, even if sign-in is never called.signInWithProvider("apple", …)throws at runtime if invoked.Changes
Web3NonCustodialProviderParams.appleOauth2ClientIdis now?: stringand@deprecated. Passing a non-empty value throws from the constructor.signInWithProvider(provider, …)throws ifprovider === "apple"(cast-guarded so JS callers also crash cleanly)."apple"removed fromWeb3AuthProviderandUserControlledWalletDirectTotype unions.examples/nextjsandexamples/react-nativeprovider lists.Web3ProjectBranding.appleEnabled?retained as@deprecatedso legacy API payloads continue to deserialize cleanly; UIs should ignore it.Migration
new Web3NonCustodialProvider({ projectId, googleOauth2ClientId, twitterOauth2ClientId, discordOauth2ClientId, - appleOauth2ClientId, }); - await provider.signInWithProvider("apple", redirectUrl, cb); + // use "google" | "discord" | "twitter" | "email" insteadTest plan
pnpm build:sdksucceedsappleOauth2ClientIdis truthysignInWithProvider("apple", …)throws at runtime