Skip to content

Commit e8d40d6

Browse files
authored
feat(gotrue): Remove client-side provider validation for signInWithIdToken (#1209)
1 parent d729fa4 commit e8d40d6

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

packages/gotrue/lib/src/gotrue_client.dart

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,6 @@ class GoTrueClient {
374374

375375
/// Allows signing in with an ID token issued by certain supported providers.
376376
/// The [idToken] is verified for validity and a new session is established.
377-
/// This method of signing in only supports [OAuthProvider.google], [OAuthProvider.apple], [OAuthProvider.kakao] or [OAuthProvider.keycloak].
378377
///
379378
/// If the ID token contains an `at_hash` claim, then [accessToken] must be
380379
/// provided to compare its hash with the value in the ID token.
@@ -384,24 +383,13 @@ class GoTrueClient {
384383
///
385384
/// [captchaToken] is the verification token received when the user
386385
/// completes the captcha on the app.
387-
///
388-
/// This method is experimental.
389-
@experimental
390386
Future<AuthResponse> signInWithIdToken({
391387
required OAuthProvider provider,
392388
required String idToken,
393389
String? accessToken,
394390
String? nonce,
395391
String? captchaToken,
396392
}) async {
397-
if (provider != OAuthProvider.google &&
398-
provider != OAuthProvider.apple &&
399-
provider != OAuthProvider.kakao &&
400-
provider != OAuthProvider.keycloak) {
401-
throw AuthException('Provider must be '
402-
'${OAuthProvider.google.name}, ${OAuthProvider.apple.name}, ${OAuthProvider.kakao.name} or ${OAuthProvider.keycloak.name}.');
403-
}
404-
405393
final response = await _fetch.request(
406394
'$_url/token',
407395
RequestMethodType.post,

0 commit comments

Comments
 (0)