balena-aws-lambda icon indicating copy to clipboard operation
balena-aws-lambda copied to clipboard

Failure with cloud function when account uses 2FA

Open kb2ma opened this issue 2 years ago • 1 comments

When a device attempts to provision via the server side code, the server code first uses the balena API to validate that the device UUID is valid. The first step in validation is to login to the user's account with their email address and password. However if 2FA is enabled, this attempt fails with an error like,

Error: BalenaRequestError: Request error: Unauthorized

The solution is to login here with an API key token, via the sdk auth.loginWithToken() function.

kb2ma avatar Apr 14 '22 17:04 kb2ma

Link for affected support thread: https://jel.ly.fish/support-thread-1-0-0-front-cnv-cda40nh

Be sure to notify the reporter of that ticket when this issue is fixed.

kb2ma avatar Apr 14 '22 17:04 kb2ma