[auth] Fix issue with null photo URL when updating profile #911
This commit is contained in:
parent
6ff34f4daa
commit
9f9a3da5af
|
@ -596,8 +596,7 @@ class RNFirebaseAuth extends ReactContextBaseJavaModule {
|
|||
|
||||
if (props.hasKey("photoURL")) {
|
||||
String photoURLStr = props.getString("photoURL");
|
||||
Uri uri = Uri.parse(photoURLStr);
|
||||
profileBuilder.setPhotoUri(uri);
|
||||
profileBuilder.setPhotoUri(photoURLStr == null ? null : Uri.parse(photoURLStr));
|
||||
}
|
||||
|
||||
UserProfileChangeRequest profileUpdates = profileBuilder.build();
|
||||
|
@ -1067,7 +1066,7 @@ class RNFirebaseAuth extends ReactContextBaseJavaModule {
|
|||
public void reauthenticateAndRetrieveDataWithCredential(String appName, String provider, String authToken, String authSecret, final Promise promise) {
|
||||
reauthenticate(appName, provider, authToken, authSecret, promise, true);
|
||||
}
|
||||
|
||||
|
||||
public void reauthenticate(String appName, String provider, String authToken, String authSecret, final Promise promise, final boolean withData) {
|
||||
FirebaseApp firebaseApp = FirebaseApp.getInstance(appName);
|
||||
final FirebaseAuth firebaseAuth = FirebaseAuth.getInstance(firebaseApp);
|
||||
|
|
Loading…
Reference in New Issue