Login to discourse website automatically

Yes, email token expiry is set by the “email token valid hours” site setting.

So basically you want a plugin that adds an endpoint to create and return an email_token for a user and you’ll call it on a regular basis when the tokens expire?