Tesla refresh token does not seem viable in static thing configuration

In the documentation:

Bridge tesla:account:myaccount "My Tesla Account" [ refreshToken="xxxx" ] {
    model3 mycar "My favorite car" [ vin="5YJSA7H25FFP53736"]
}

The refreshToken is used to get an authtoken for the API, but that also invalidates the prior authtoken and refreshtoken. When not defining the Bridge in a file, it works because the code writes the new refreshtoken to the config, however when using file based things, the value is always what was set in the file, so the updated refresh token will not be written, and when the binding is re-instantiated it will fail.

Thus it seems that the only way to use the Tesla binding from a thing file is by specifying the username and password of the account in plaintext? Is this correct?

I’m wondering if I should add a configuration for the access token itself, which doesn’t get invalidated very often (I’ve used the same one for almost a year in my shell scripts). That way the binding will work and I don’t have to expose the password.

Are you asking about making changes to the tesla binding or just configuration? Because you posted in development, which is about binding development.

Yeah sorry, it is a binding development question.

I’m asking for somebody to confirm that what I stated is actually an issue, as opposed to me missing something obvious.

I already made a bunch of changes to the binding (see Tesla 2.5 binding - #14 by billfor) so I just wanted to know if I should add another option to for the access_token (not the refresh_token) which would be used by the binding as-is, so that if somebody wanted to have their things in a file, they could put the access token there and not their username and password.