Android with changing date and time but pushing again, Firebase just returns the expired token

I did some tests in my application, changing the current date of the mobile phone for the future. Like 2, 4, 7, 10 days in advance. Then I put the mobile phone back on the current date.

I use Firebase for authentication, but at the moment it only returns expired tokens. I already tried to reboot the mobile phone, reinstall the application, and the problem persists.

It works correctly on other phones that I did not change the date.

PS: The problem is happening on the Sansung S5.

This is how I get the token, and every time I make a request to my server, I get the token again. By the way, I am using a custom Firebase token.

var mUser: FirebaseUser? = FirebaseAuth.getInstance().currentUser mUser?.getToken(true) ?.addOnCompleteListener { it -> it.result.token } 
+5
source share

Source: https://habr.com/ru/post/1261336/


All Articles