I need to notify users to change their password once every 6 months.
I can see the date the user's account was created and the date the user last logged in.
Auth.auth().currentUser?.metadata.creationDate
Auth.auth().currentUser?.metadata.lastSignInDate
But I don't know how to get the date the user changed the password.
How to get change password date in Firebase ?
CodePudding user response:
maybe you can try rechanging the password programmatically or pushing the time in database and then getting the key
CodePudding user response:
The Firebase SDK don't expose the timestamp that the password was last changed, but I see that the value is exposed on the REST API in the passwordUpdatedAt
property. That means the value also is likely present in the ID token of the user, so you could try logging the raw value of that or decoding it yourself and checking the claims in there.