Skip to content

Commit

Permalink
feat(goture): Allow OAuthProvider.kakao for signInWithIdToken (#922)
Browse files Browse the repository at this point in the history
feat(goture): allow OAuthProvider.kakao for signInWithIdToken

Co-authored-by: logan <[email protected]>
  • Loading branch information
nectarine and logan authored May 9, 2024
1 parent 04a59dc commit e21db45
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions packages/gotrue/lib/src/gotrue_client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,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.google] or [OAuthProvider.apple].
/// This method of signing in only supports [OAuthProvider.google], [OAuthProvider.apple] or [OAuthProvider.kakao].
///
/// 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.
Expand All @@ -395,9 +395,11 @@ class GoTrueClient {
}) async {
_removeSession();

if (provider != OAuthProvider.google && provider != OAuthProvider.apple) {
throw AuthException('Provider must either be '
'${OAuthProvider.google.name} or ${OAuthProvider.apple.name}.');
if (provider != OAuthProvider.google &&
provider != OAuthProvider.apple &&
provider != OAuthProvider.kakao) {
throw AuthException('Provider must be '
'${OAuthProvider.google.name}, ${OAuthProvider.apple.name} or ${OAuthProvider.kakao.name}.');
}

final response = await _fetch.request(
Expand Down

0 comments on commit e21db45

Please sign in to comment.