com.google.firebase.auth.FirebaseAuthWeakPasswordException Java Examples

The following examples show how to use com.google.firebase.auth.FirebaseAuthWeakPasswordException. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: DefaultErrorResolver.java    From demo-firebase-android with The Unlicense 5 votes vote down vote up
@Override @Nullable protected String baseResolve(Throwable t) {
    if (t instanceof HttpException) {
        HttpException exception = (HttpException) t;

        switch (exception.code()) {
            case Const.Http.BAD_REQUEST:
                return "Bad Request";
            case Const.Http.UNAUTHORIZED:
                return "Unauthorized";
            case Const.Http.FORBIDDEN:
                return "Forbidden";
            case Const.Http.NOT_ACCEPTABLE:
                return "Not acceptable";
            case Const.Http.UNPROCESSABLE_ENTITY:
                return "Unprocessable entity";
            case Const.Http.SERVER_ERROR:
                return "Server error";
            default:
                return null;
        }
    } else if (t instanceof FirebaseAuthInvalidUserException) {
        return "This Id is not registered";
    } else if (t instanceof FirebaseAuthInvalidCredentialsException) {
        return "Password is wrong";
    } else if (t instanceof FirebaseAuthWeakPasswordException) {
        return "Password is not strong enough";
    } else if (t instanceof FirebaseAuthInvalidCredentialsException) {
        return "Id is malformed";
    } else if (t instanceof FirebaseAuthUserCollisionException) {
        return "User with current Id already exists";
    } else {
        return null;
    }
}