Java Firebase authWithOAuthToken&;密码提供者
是否可以使用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
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()
可能有效。尝试一下可能是找到答案的一种方法。文档声明第一个参数是提供者,第二个参数是凭证,第三个参数是回调。我将尝试使用自定义令牌。