Closed
Description
It seems the check to verify if the user is a new SignUp or existing user is not working.
I signed up a user brand new and then logged out of email provider.
I then logged in again (and got the welcome back screen) and signed in again.
I did this immediately with about 10 seconds delay between:
but the following code always returns true:
public boolean isNewSignUp() {
FirebaseUserMetadata metadata = mAuth.getCurrentUser().getMetadata();
if (metadata.getCreationTimestamp() == metadata.getLastSignInTimestamp()) {
Toast.makeText(getActivity(), "new user ACCOUNT CREATED", Toast.LENGTH_LONG).show();
} else {
// This is an existing user, show them a welcome back screen.
Toast.makeText(getActivity(), "existing user account retrieved", Toast.LENGTH_LONG).show();
}
return metadata.getCreationTimestamp() == metadata.getLastSignInTimestamp();
}
i am using fireBaseUI-Auth and this check happens in onActivityResult. What am i missing ?
Metadata
Metadata
Assignees
Labels
No labels