Login via oauth2 flow (#725)

Reviewed-on: https://gitea.com/gitea/tea/pulls/725
Co-authored-by: techknowlogick <techknowlogick@gitea.com>
Co-committed-by: techknowlogick <techknowlogick@gitea.com>
This commit is contained in:
techknowlogick
2025-03-18 17:01:49 +00:00
committed by techknowlogick
parent e82dd9e08d
commit 62dc1dde95
10 changed files with 710 additions and 158 deletions

View File

@ -51,6 +51,8 @@ List Gitea logins
Add a Gitea login
**--client-id**="": OAuth client ID (for use with --oauth)
**--helper, -j**: Add helper
**--insecure, -i**: Disable TLS verification
@ -59,10 +61,14 @@ Add a Gitea login
**--no-version-check, --nv**: Do not check version of Gitea instance
**--oauth, -o**: Use interactive OAuth2 flow for authentication
**--otp**="": OTP token for auth, if necessary
**--password, --pwd**="": Password for basic auth (will create token)
**--redirect-url**="": OAuth redirect URL (for use with --oauth)
**--scopes**="": Token scopes to add when creating a new token, separated by a comma
**--ssh-agent-key, -a**="": Use SSH public key or SSH fingerprint to login (needs a running ssh-agent with ssh key loaded)
@ -93,6 +99,10 @@ Get or Set Default Login
**--output, -o**="": Output format. (simple, table, csv, tsv, yaml, json)
### oauth-refresh
Refresh an OAuth token
## logout
Log out from a Gitea server