728x90
            val user = FirebaseAuth.getInstance().currentUser
            user?.let {
                for (profile in it.providerData) {
                    when(profile.providerId){
                        GoogleAuthProvider.PROVIDER_ID -> {
                            Log.d(LogTag, "GoogleAuthProvider")
                        }
                        EmailAuthProvider.PROVIDER_ID -> {
                            Log.d(LogTag, "EmailAuthProvider")
                        }
                        PhoneAuthProvider.PROVIDER_ID -> {
                            Log.d(LogTag, "PhoneAuthProvider")
                        }
                        FacebookAuthProvider.PROVIDER_ID -> {
                            Log.d(LogTag, "FacebookAuthProvider")
                        }
                        TwitterAuthProvider.PROVIDER_ID -> {
                            Log.d(LogTag, "TwitterAuthProvider")
                        }
                        GithubAuthProvider.PROVIDER_ID -> {
                            Log.d(LogTag, "GithubAuthProvider")
                        }
                    }
                }
            }

킹갓엠페러 스택오버플로우 형님들 답변 입니다.

 

출처: https://stackoverflow.com/questions/46901153/what-is-the-full-list-of-provider-ids-for-firebase-userinfo-providerid

728x90

+ Recent posts