Skip to content

Logout function #194

Answered by mobizt
paulaegido asked this question in Q&A
Oct 5, 2021 · 1 comments · 3 replies
Discussion options

You must be logged in to vote

There is no log out function as this client library used the access or id token for authentication.
Then to sign in as another user, jus create the new token.

You can use the following code to re-authenticate the user anywhere as you want.

//Close the session and clear all data
fbdo.clear();

//To make the token to expire immediately.
config.signer.lastReqMillis = 0;
config.signer.tokens.expires = 0;

//Assign new user sig-in credentials
auth.user.email = USER_EMAIL;
auth.user.password = USER_PASSWORD;

//Begin authenticate
Firebase.begin(&config, &auth);

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@paulaegido
Comment options

@mobizt
Comment options

@paulaegido
Comment options

Answer selected by paulaegido
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants