From 1748f6e2a7c3482a53b4ae5a8fc70203553d4ba4 Mon Sep 17 00:00:00 2001 From: Guilherme Souza Date: Tue, 12 Aug 2025 07:28:27 -0300 Subject: [PATCH] feat(gotrue): remove client-side provider validation for signInWithIdToken MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove experimental annotation and provider restrictions from signInWithIdToken method. The client will no longer validate supported providers - this validation will be handled by the backend, allowing for more flexible provider support. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- packages/gotrue/lib/src/gotrue_client.dart | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/packages/gotrue/lib/src/gotrue_client.dart b/packages/gotrue/lib/src/gotrue_client.dart index 527287be8..b229dcfb9 100644 --- a/packages/gotrue/lib/src/gotrue_client.dart +++ b/packages/gotrue/lib/src/gotrue_client.dart @@ -374,7 +374,6 @@ class GoTrueClient { /// Allows signing in with an ID token issued by certain supported providers. /// The [idToken] is verified for validity and a new session is established. - /// This method of signing in only supports [OAuthProvider.google], [OAuthProvider.apple], [OAuthProvider.kakao] or [OAuthProvider.keycloak]. /// /// If the ID token contains an `at_hash` claim, then [accessToken] must be /// provided to compare its hash with the value in the ID token. @@ -384,9 +383,6 @@ class GoTrueClient { /// /// [captchaToken] is the verification token received when the user /// completes the captcha on the app. - /// - /// This method is experimental. - @experimental Future signInWithIdToken({ required OAuthProvider provider, required String idToken, @@ -394,14 +390,6 @@ class GoTrueClient { String? nonce, String? captchaToken, }) async { - if (provider != OAuthProvider.google && - provider != OAuthProvider.apple && - provider != OAuthProvider.kakao && - provider != OAuthProvider.keycloak) { - throw AuthException('Provider must be ' - '${OAuthProvider.google.name}, ${OAuthProvider.apple.name}, ${OAuthProvider.kakao.name} or ${OAuthProvider.keycloak.name}.'); - } - final response = await _fetch.request( '$_url/token', RequestMethodType.post,