From a55d52450207b58cce3c011a3ae769cb7857198c Mon Sep 17 00:00:00 2001 From: Mickael TONNELIER Date: Mon, 21 Oct 2024 14:51:25 +0200 Subject: [PATCH] feat: change order verification --- packages/gotrue/lib/src/gotrue_client.dart | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/gotrue/lib/src/gotrue_client.dart b/packages/gotrue/lib/src/gotrue_client.dart index 35c3d8e8..63f5c85f 100644 --- a/packages/gotrue/lib/src/gotrue_client.dart +++ b/packages/gotrue/lib/src/gotrue_client.dart @@ -382,7 +382,7 @@ 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.keycloak], [OAuthProvider.google], [OAuthProvider.apple] or [OAuthProvider.kakao]. + /// 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. @@ -402,12 +402,12 @@ class GoTrueClient { String? nonce, String? captchaToken, }) async { - if (provider != OAuthProvider.keycloak && - provider != OAuthProvider.google && + if (provider != OAuthProvider.google && provider != OAuthProvider.apple && - provider != OAuthProvider.kakao) { + provider != OAuthProvider.kakao && + provider != OAuthProvider.keycloak) { throw AuthException('Provider must be ' - '${OAuthProvider.keycloak.name}, ${OAuthProvider.google.name}, ${OAuthProvider.apple.name} or ${OAuthProvider.kakao.name}.'); + '${OAuthProvider.google.name}, ${OAuthProvider.apple.name}, ${OAuthProvider.kakao.name} or ${OAuthProvider.keycloak.name}.'); } final response = await _fetch.request(