Logout function #194
-
Hi. I am developing an IoT app that integrates Arduino, Firebase, a touch display and the app on a phone. I work with several users, then I need to do dynamic authentication through the arduino display to save the sensor data in the unique log of each user. I only have one thing left to implement, and that is the logout function. Doesn't the library have an existing one to be able to logout and start a new session with another user through the display? Some way to update the user saved... |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
There is no log out function as this client library used the access or id token for authentication. 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); |
Beta Was this translation helpful? Give feedback.
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.