You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: src/lib.rs
+19-5
Original file line number
Diff line number
Diff line change
@@ -39,6 +39,7 @@
39
39
//! to create user tokens in this library.
40
40
//!
41
41
//! Things like [`UserTokenBuilder`] can be used to create a token from scratch, via the [OAuth authorization code flow](https://dev.twitch.tv/docs/authentication/getting-tokens-oauth/#authorization-code-grant-flow)
42
+
//! You can also use the newer [OAuth device code flow](https://dev.twitch.tv/docs/authentication/getting-tokens-oauth/#device-code-grant-flow) with [`DeviceUserTokenBuilder`].
42
43
//!
43
44
//! ## App access token
44
45
//!
@@ -70,8 +71,8 @@ use tokens::errors::{RefreshTokenError, RevokeTokenError, ValidationError};
/// Device URL (`https://id.twitch.tv/oauth2/device`) for `id.twitch.tv`
130
+
///
131
+
/// Can be overridden when feature `mock_api` is enabled with environment variable `TWITCH_OAUTH2_URL` to set the root path, or with `TWITCH_OAUTH2_DEVICE_URL` to override the base (`https://id.twitch.tv/oauth2/`) url.
132
+
///
133
+
/// # Examples
134
+
///
135
+
/// Set the environment variable `TWITCH_OAUTH2_URL` to `http://localhost:8080/auth/` to use [`twitch-cli` mock](https://github.com/twitchdev/twitch-cli/blob/main/docs/mock-api.md) endpoints.
/// Validation URL (`https://id.twitch.tv/oauth2/validate`) for `id.twitch.tv`
129
141
///
130
142
/// Can be overridden when feature `mock_api` is enabled with environment variable `TWITCH_OAUTH2_URL` to set the root path, or with `TWITCH_OAUTH2_VALIDATE_URL` to override the base (`https://id.twitch.tv/oauth2/`) url.
0 commit comments