You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
function_tokenValidity(data){constnow=newDate();// Storing "now"// If "data.authTime" is not defined, we set it to a new date, which will usually be later than "now"constauthTime=data.authTime ?
data.authTime : newDate();
...
// If "data.authTime" is not defined, this will most likely trigger }elseif(now<authTime){thrownewError(MockFirebaseUser.msg_tokenAuthedInTheFuture);
The text was updated successfully, but these errors were encountered:
awaitfirebaseAdmin.auth().createUser({// Your normal fields here
uid,
email,
password,emailVerified: true,// Workaround_tokenValidity: {issuedAtTime: newDate(),authTime: newDate(1970,1,1),expirationTime: newDate(3000,1,1),},});
If
authTime
is not specified when creating aMockFirebaseUser
, the code has a race condition when setting the date at https://github.com/dmurvihill/firebase-mock/blob/master/src/user.js#L170.Added inline comments on the code from that file
The text was updated successfully, but these errors were encountered: