diff --git a/auth/src/main/java/org/openedx/auth/presentation/sso/FacebookAuthHelper.kt b/auth/src/main/java/org/openedx/auth/presentation/sso/FacebookAuthHelper.kt index 70f2209ab..f6e734629 100644 --- a/auth/src/main/java/org/openedx/auth/presentation/sso/FacebookAuthHelper.kt +++ b/auth/src/main/java/org/openedx/auth/presentation/sso/FacebookAuthHelper.kt @@ -46,8 +46,8 @@ class FacebookAuthHelper { continuation.safeResume( SocialAuthResponse( accessToken = result.accessToken.token, - name = obj?.getString(ApiConstants.NAME) ?: "", - email = obj?.getString(ApiConstants.EMAIL) ?: "", + name = obj?.optString(ApiConstants.NAME).orEmpty(), + email = obj?.optString(ApiConstants.EMAIL).orEmpty(), authType = AuthType.FACEBOOK, ) ) {