Closed janhalama closed 3 years ago
I just realised that login interfaces should be organised in files differently:
./interfaces/login_api_responses.ts ./interfaces/login_api_options.ts
Looks good! 👍
2 things:
- I like the interface files structure you proposed in the added comment, I think it'd be cleaner that way
- nitpicking: not sure we're following any specific naming conventions, but maybe
verifyCLILogin
would read nicer to me if it wasverifyCliLogin
I changed interface files structure and changed verifyCliLogin
and confirmCliLogin
method names.
@kysely there were conflicts with main branch I did not notice yesterday, now main is rebased
This PR implements support for CLI login. CLI methods added into
ServiceClient
arecliLogin
,verifyCLILogin
andconfirmCLILogin
.Passwordless and CLI login endpoints are very similar. Following interfaces has been renamed and the code reused in CLI login methods:
PasswordlessVerifyOptions
renamed toVerifyOptions
PasswordlessVerifyResponse
renamed toVerifyResponse
PasswordlessVerifyErrorResponse
renamed toVerifyErrorResponse
PasswordlessConfirmErrorResponse
renamed toLoginConfirmErrorResponse
cliLogin
andverifyCLILogin
methods are designed to be used from CLIconfirmCLILogin
is designed be used from Air and requires that user is logged inRenaming interfaces is breaking change and will require minor changes in Air. @kysely