Skip to content

Commit 436fb6c

Browse files
author
logan
committed
feat(goture): allow OAuthProvider.kakao for signInWithIdToken
1 parent 04a59dc commit 436fb6c

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

packages/gotrue/lib/src/gotrue_client.dart

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ class GoTrueClient {
373373

374374
/// Allows signing in with an ID token issued by certain supported providers.
375375
/// The [idToken] is verified for validity and a new session is established.
376-
/// This method of signing in only supports [OAuthProvider.google] or [OAuthProvider.apple].
376+
/// This method of signing in only supports [OAuthProvider.google], [OAuthProvider.apple] or [OAuthProvider.kakao].
377377
///
378378
/// If the ID token contains an `at_hash` claim, then [accessToken] must be
379379
/// provided to compare its hash with the value in the ID token.
@@ -395,9 +395,11 @@ class GoTrueClient {
395395
}) async {
396396
_removeSession();
397397

398-
if (provider != OAuthProvider.google && provider != OAuthProvider.apple) {
399-
throw AuthException('Provider must either be '
400-
'${OAuthProvider.google.name} or ${OAuthProvider.apple.name}.');
398+
if (provider != OAuthProvider.google &&
399+
provider != OAuthProvider.apple &&
400+
provider != OAuthProvider.kakao) {
401+
throw AuthException('Provider must be '
402+
'${OAuthProvider.google.name}, ${OAuthProvider.apple.name} or ${OAuthProvider.kakao.name}.');
401403
}
402404

403405
final response = await _fetch.request(

0 commit comments

Comments
 (0)