카테고리 없음
GoogleSignInPlatform.instance.getTokens throws PlatformException(exception, ERROR, null, null)
끄적a
2024. 9. 23. 14:38
Firebase auth를 사용해서 구글 로그인을 구현 하였는데 로그인이 안되는 이슈가 갑자기 발생하였다.
https://github.com/flutter/flutter/issues/155429
GoogleSignInPlatform.instance.getTokens throws PlatformException(exception, ERROR, null, null) for some users / devices · Issue
What package does this bug report belong to? google_sign_in What target platforms are you seeing this bug on? Android Have you already upgraded your packages? Yes Dependency versions pubspec.lock h...
github.com
Chat gpt로 물어보다가 해결이 안되 구글링 해보니 원인을 알았다.
google쪽에서 수정이 있었던거 같고 GoogleSignIn 객체를 생성할때 scopes를 넣어주면 해결이된다.
final GoogleSignIn _googleSignIn = GoogleSignIn(); // 기존
final GoogleSignIn _googleSignIn = GoogleSignIn(scopes: ['email'],); // 수정
Chat gpt하고만 문제 해결을 하려다가 이상하게 시간을 잡아 먹었는데... 구글이 아직 필요함을 느끼게 된다.