how to create anonymous account programmatically using Admin SDK that signed in at certain time?

Viewed 75

hi I need to perform testing for my cloud function, but I need to create dummy anonymous account in Authentication emulator

I need to create anonymous account that has last signed in data 2 months ago. how to do that?

to create account using email, I can use code like this

admin.auth().createUser({
    email: "jdoe@gmail.com",
    emailVerified: false,
    password: "secretPassword",
    displayName: "John Doe",
    disabled: false
});

how to create anonymous account programmatically using Admin SDK that signed in at certain time?

1 Answers

I don't think it is possible to set the creation data and time in the new account. As far as I can determine those values are managed by automatically when an ID token is generated when a user signs in to a (new or existimg) account from the client.

Related