Open jasan-s opened 3 years ago
I'd be interested in collaborating on this. Looking to do something along these lines, I think for starters, we need to enable a way to ask for username and password via API, generate device token, store it with the challenge id. Then provide another API to accept those plus the sms code, in an async way. Right now it just waits for the entire process to happen on stdin. Finally, to store the session so we dont get challenged again, we need to pin the device code for that user / login pair. Needs to be tested, as not sure what other checks there are from a security point of view (eg ip devices etc), that might be used to expire the session. But at a minimum breaking the auth / challenge flow into two steps vs one is where I planned on starting, with the intent of building a login form of sorts vs CLI.
Is it possible to auth with SMS MFA in a cloud function/lambda and persist auth
Could this be possible: on initial cloud function run the SMS mfa can be requested and session be saved and then when MFA received the session can be loader and mfa entered to get the auth token and refresh token. and then use the refresh token to refresh auth token before it expires.