Crates.io | clio-auth |
lib.rs | clio-auth |
version | 0.8.0 |
source | src |
created_at | 2023-07-24 13:58:12.606464 |
updated_at | 2024-06-26 15:55:11.786881 |
description | OAuth 2 helper library for CLI and desktop applications |
homepage | |
repository | https://github.com/riversoforion/clio-auth |
max_upload_size | |
id | 924608 |
size | 116,674 |
CliOAuth (pronounced "klee-oh-awth") is a utility to assist CLI/desktop application developers with implementing the OAuth 2.0 Authorization Code flow with PKCE.
To learn more about Auth Code w/ PKCE, Auth0 has a good tutorial.
The oauth2
crate provides an excellent OAuth2 client implementation. However, to support the Auth Code with PKCE
flow in a native desktop application, a couple of additional pieces are necessary:
state
parameter)CliOAuth provides these pieces in an asynchronous and extensible way. It is designed to supplement the oauth2::Client
struct, but not interfere with its normal usage.
General usage is as follows:
CliOAuthBuilder
to build a CliOAuth
helperoauth2::Client
See the Crate documentation for more details, including an example.