Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/322.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java Firebase authWithOAuthToken&;密码提供者_Java_Firebase_Firebase Authentication - Fatal编程技术网

Java Firebase authWithOAuthToken&;密码提供者

Java Firebase authWithOAuthToken&;密码提供者,java,firebase,firebase-authentication,Java,Firebase,Firebase Authentication,是否可以使用firebase自己的密码提供程序调用authWithOAuthToken? 例如: final Firebase user = ref.child("users").child(uid); user.authWithOAuthToken("password", old_token, new Firebase.AuthResultHandler() { @Override public void onAuthenticated(AuthData

是否可以使用firebase自己的密码提供程序调用authWithOAuthToken? 例如:

final Firebase user = ref.child("users").child(uid);
    user.authWithOAuthToken("password", old_token, new Firebase.AuthResultHandler() {
        @Override
        public void onAuthenticated(AuthData authData) {

           String new_token = authData.getToke();
           //do autenticaded stuff
        }

        @Override
        public void onAuthenticationError(FirebaseError firebaseError) {
            // handle error
        }
    });

这没有逻辑上的原因,因为
password
不是有效的oauth提供程序,而且authWithOAuthToken的第一个参数是令牌,而不是提供程序字符串
authWithCustomToken()
可能有效。尝试一下可能是找到答案的一种方法。文档声明第一个参数是提供者,第二个参数是凭证,第三个参数是回调。我将尝试使用自定义令牌。这没有逻辑上的原因,因为
password
不是有效的oauth提供程序,而且authWithOAuthToken的第一个参数是令牌,而不是提供程序字符串
authWithCustomToken()
可能有效。尝试一下可能是找到答案的一种方法。文档声明第一个参数是提供者,第二个参数是凭证,第三个参数是回调。我将尝试使用自定义令牌。