Skip to content

feat(goture): Allow OAuthProvider.kakao for signInWithIdToken #922

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading