Cloudron CLI & 2FA
Solved
Support
-
Hi, if I try to login locally to cloudron via the CLI with 2FA enabled, I only get the option to login with user/pass. Then it fails.
The docs at cloudron login -h don't show how to proceed
Failed to login: Cannot destructure property 'rejectUnauthorized' of 'options' as it is undefined.
-
@fbartels What version of CLI did you downgrade from?
The error message is coming from https://git.cloudron.io/cloudron/cloudron-cli/-/blob/master/src/actions.js#L310 . I think the actual exception is caused by the de-structuring in
https://git.cloudron.io/cloudron/cloudron-cli/-/blob/master/src/actions.js#L255 . Strange, I don't see how options can ever beundefined
.const [error, result] = await safe(authenticate(adminFqdn, username, password, { rejectUnauthorized, askForTotpToken: false })); if (error) return exit(`Failed to login: ${error.message}`);
-
@fbartels @ghodgeon
I guess you have 2FA enabled? I can reproduce it with 2FA. (er, doh, i didn't see the title of this post).$ cloudron login my.cloudron.domain Existing token possibly expired: Invalid token. Use cloudron login again. Username: girish Password: ********* Failed to login: Cannot destructure property 'rejectUnauthorized' of 'options' as it is undefined.