cli/pkg/cmd/auth
Tyler McGoffin 52daa9cf7d Add --token flag to gh auth login to accept a PAT as a flag
Additionally, this commit adds acceptance testing for `gh auth login` and
`gh auth logout`.

The --token flag was necessary for adding testing for `gh auth login`
because the current implementation with `--with-token` appears to be
broken. It hangs, waiting for user input, but user input doesn't exit it.

Additionally, it appears that `--with-token` is intended to allow for TTY
input of an auth token, but it isn't implemented.

`--with-token` does work when used with the redirect operator `<` when the
token is saved in a file. However, due to limitations of testscripts, I
could not use a file for saving the token in a repeatable manner. Thus,
implementing the `--token` flag seemed like a quick solution to validate
that the direction I was going during testing was valid.

Whether the flag stays or not is up for discussion, and I'd love to get
input on that from the team.
2024-10-21 16:38:10 -07:00
..
gitcredential Add error to auth refresh when active user does not match newly authenticated token user 2023-12-06 16:51:48 -04:00
login Add --token flag to gh auth login to accept a PAT as a flag 2024-10-21 16:38:10 -07:00
logout Add --token flag to gh auth login to accept a PAT as a flag 2024-10-21 16:38:10 -07:00
refresh Make gitcredential helper smarter 2024-05-16 13:15:26 +02:00
setupgit Enhance gh repo create docs, fix random cmd link 2024-09-16 13:42:51 -04:00
shared Remove TODO and add comment on LoginFlow tests 2024-05-17 14:51:02 +02:00
status Expand active test cases 2024-08-30 10:57:51 -04:00
switch Move config interfaces into gh package (#9060) 2024-05-10 10:39:36 +02:00
token Move config interfaces into gh package (#9060) 2024-05-10 10:39:36 +02:00
auth.go Implement auth switch 2023-12-06 14:06:28 +01:00