This PR adds the ability to login without having to go through the interactive login flow (aka currently the only way to login)
Changes
Added --non-interactive flag to auth parser. When enabled, the CLI will output the required data to complete a login as JSON and exit
Added register parser. This parser takes the client_id, code_verifier and serial provided by auth --login --non-interactive, as well as the authorization code extracted by the user from the redirect url after web login
Example flow
A user calls nile auth --login --non-interactive. Example output:
Closes #27
Non-interactive Login Support
This PR adds the ability to login without having to go through the interactive login flow (aka currently the only way to login)
Changes
--non-interactive
flag toauth
parser. When enabled, the CLI will output the required data to complete a login as JSON and exitregister
parser. This parser takes theclient_id
,code_verifier
andserial
provided byauth --login --non-interactive
, as well as the authorization code extracted by the user from the redirect url after web loginExample flow
A user calls
nile auth --login --non-interactive
. Example output:The user then follows the
url
and completes the web login.After that, they take the authorization code from the
openid.oa2.authorization_code
query parameter in the redirect URL.Finally, the user calls
nile register --code AUTHORIZATION_CODE --client-id CLIENT_ID --code-verifier CODE_VERIFIER --serial SERIAL
.After this, the user is logged in.