2FA TOTP code generation support

I see (and have) many problems of session losing on backends that require 2FA codes for authenticating

I tried to look about and did not find anyone suggesting to implement some mechanism so one can provide it's own TOTP secret code (instead of the code itself) and rclone store it to resolve the TOTP when needed. This could be an option so one can still provide only the code if one wants.

Was this idea already discussed? Is there any reason for it being unwanted?

welcome to the forum,

sorry, not sure what all that means? what is it that you want rclone to do?
which backends?


i generate TOTP codes using python

For example, for using the proton drive backend one of the steps is to provide a 2FA code, if the account requires one.

This does so one need to provide it any time it disconnects and needs to re authenticate.

Alternatively, it would be possible to provide the TOTP secret code, something like:

oauth://totp/Provider?secret=XXXXXXXX

and use some library, like GitHub - pquerna/otp: TOTP library for Go to generate the code when needed.

This way it's not necessary to input the code when it loses the session.

the problem is that rclone proton drive seems to be abandoned.
the author has not visited the forum in over a year, does not respond when mentioned in the forum,

and does not respond to rclone primary author
https://github.com/henrybear327/go-proton-api/issues/3


my advice, write some simple source code to generate the 2fa code and insert the code into the rclone config file.