Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firebase autologin (first time login) workflow for c++ bindings

I wanna get subj workflow for my program, but I don't want store users login/password pair in open way. What I should use for realize that workflow in my app? Any advises ? Thanks.

update: What I have now, simple app, written in Qt/Qml and uses Firebase C++ api.

On Start I'n getting Firebase::App and Firebase::Auth succefully init. After init Auth, I am register AuthStateListener Class with simple handler code:

void AuthManager::OnAuthStateChanged(firebase::auth::Auth *auth)
{

    if(auth->CurrentUser()){
        qDebug() << "get auth :" << auth->CurrentUser()->Email().c_str();
    }
    else{
        qDebug() << "still not auth";
    }
}

After start app it writes to console second-branch log ("still not auth"). And none happens else. Then, in gui I click to my signIn button and do SignInWithEmailAndPassword in button's handler. After that I get new event in OnAuthStateChanged. Now I authorizated, but no autologin. Hope it helps. Thanks.

like image 540
Dcow Avatar asked Nov 09 '22 05:11

Dcow


1 Answers

Problem solved by updating to Firebase C++ SDK 2.1.0 (from 9dec 2016)

like image 68
Dcow Avatar answered Nov 14 '22 23:11

Dcow