Skip to content

Login command using device auth flow#14

Merged
eikek merged 14 commits intomainfrom
login
Jul 26, 2024
Merged

Login command using device auth flow#14
eikek merged 14 commits intomainfrom
login

Conversation

@eikek
Copy link
Copy Markdown
Member

@eikek eikek commented Jul 19, 2024

Adds a login command using the device flow. The token is stored on disk in the "application folder" which is picked for each system according to the desktop standard.

The http client uses this token if it is available to do requests. After login has run successfully, private projects (with public repos :)) can be cloned with the clone command.

The access token can also be specified as an environment variable RENKU_CLI_ACCESS_TOKEN. In that case, the result from the login command will be ignored.

The openidconnect dependency is nice to use for this task, but one of its dependencies (rsa) has an open vulnerability, see here. This one has been added to the ignore list (of cargo audit and cargo deny).

eikek added 4 commits July 24, 2024 15:15
Still WIP…!
- token is stored on disk
- login can be done at once or in steps (might be interesting for scripts)
- output is not yet done
Instead of the login command, the access token can be specified via an
env var
@eikek eikek force-pushed the login branch 2 times, most recently from 9eb6003 to 558fcd7 Compare July 26, 2024 08:21
@eikek eikek added the enhancement New feature or request label Jul 26, 2024
@eikek eikek marked this pull request as ready for review July 26, 2024 08:52
@eikek eikek requested review from a team as code owners July 26, 2024 08:52
@eikek eikek requested review from Panaetius and olevski July 26, 2024 08:53
Comment thread src/cli/cmd/login.rs Outdated
Comment thread src/httpclient.rs Outdated
Comment thread src/httpclient/auth.rs Outdated
Comment thread src/httpclient/cache.rs Outdated
@eikek eikek requested a review from Panaetius July 26, 2024 14:41
@eikek eikek merged commit c2fe052 into main Jul 26, 2024
@eikek eikek deleted the login branch July 26, 2024 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants