NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io
crates.io, #1268 most downloaded on crates.io
An extensible, strongly-typed implementation of OAuth2
Latest stable
5.0.0
Last release 2 years ago
no release in 18 months
Release timing varies
gaps range from 3 weeks to 10 months
Some releases are documented
notes for 20 of 34 stable releases
Nothing withdrawn
no release was ever pulled
12 years old
64 releases · first in 2014
Drag across the ruler to compare, or tap a release to open it.
Refer to the Upgrade Guide for tips on how to upgrade from 4.x.
Refer to the Upgrade Guide for tips on how to upgrade from 4.x.
Full Changelog: https://github.com/ramosbugs/oauth2-rs/compare/5.0.0-rc.1...5.0.0
TokenResponse generic with associated type (30ced325da24312c4e6b9d802adcb36a88594353)impl Future instead of Pin<Box<dyn Future>> to fix Send/Sync bounds (6e583bd03203e42ef712fc90edb57cf5a389f9b7)http to 1.0 and reqwest to 0.12 (408ecab500158145bf249e78a73a8010933bb0e2)oauth2::HttpClientError and flatten exports (e.g., oauth2::reqwest instead of oauth2::reqwest::reqwest) (4391eed01c26c3e9e9fd5a14d90f111a02636a4c)Error type and use thiserror's From impl by @MarijnS95 (#238)openidconnect crate) (576f8096914c7da82a5cd8c2253d47541697aa6a)Display output of RequestTokenError::ServerResponse (96c6f9b17b5fdea98a6a7b84bec8e420671342eb)Client endpoints statically via typestates (1d1f4d17ecdf2a3feb565eb1789cc8649cac7705)devicecode and revocation modules private (9d8f11addf819134f15c6d7f03276adb3d32e80b)reqwest-blocking feature (da7d1c51ccfac95b25af67d2e725ae510d185f5b)AsyncHttpClient and SyncHttpClient traits (23b952b23e6069525bc7e4c4f2c4924b8d28ce3a)SecretType::into_secret (#272)timing-resistant-secret-traits feature for PartialEq/Hash by @kate-shine (https://github.com/ramosbugs/oauth2-rs/pull/232)Eq for types that already derive PartialEq (b19ad89262af501f53c1b82015046506834c98e9)From instead of Into for newtypes (d9402c42767b35a4c05bc4db3780b1df115b7b24)Display trait for URL types (8bd0ff1e0339c0945871552210b300c05e89c519)base64 to 0.21 (db0ea44657bd6c1130b83ce135ac2691ba091fad)chrono to 0.4.31 (7b667fc29b52392f4c47c07f0923c88847951b50)openidconnect crate in README (7b667fc29b52392f4c47c07f0923c88847951b50)spawn_blocking to docs (1fc8188b22eaa055d3eca748964fca5876a448e2)curl as oauth2::curl and ureq as oauth2::ureq when the corresponding Cargo features are enabled (aff74710dd5ef0f5a1dfb4020e4543b497884a03)map_err() conversions with a From call via the Try operator by @MarijnS95 (#239)csrf_state by @ikehz (#245)prepare_request() methods infallible (8ef74ac5f1415be50b7db5a7a1a0cc23becbe98d)Full Changelog: https://github.com/ramosbugs/oauth2-rs/compare/4.4.2...5.0.0
Your coding agent can read these notes before it upgrades. Set up the MCP server →
This is the first release candidate for the 5.0 major version. No further breaking changes are expected until the next major version.
This is the first release candidate for the 5.0 major version. No further breaking changes are expected until the next major version.
Refer to the Upgrade Guide for tips on how to upgrade from 4.x.
SecretType::into_secret (#272)Full Changelog: https://github.com/ramosbugs/oauth2-rs/compare/5.0.0-alpha.4...5.0.0-beta.1
This is an API-unstable release intended for gathering feedback about breaking API changes in 5.0. It should be safe to use in applications, but furth
This is an API-unstable release intended for gathering feedback about breaking API changes in 5.0. It should be safe to use in applications, but further breaking API changes MAY occur before stabilizing the API for the 5.0.0 release.
Refer to the Upgrade Guide for tips on how to upgrade from 4.x.
TokenResponse generic with associated type (30ced325da24312c4e6b9d802adcb36a88594353)Full Changelog: https://github.com/ramosbugs/oauth2-rs/compare/5.0.0-alpha.3...5.0.0-alpha.4
This is an API-unstable release intended for gathering feedback about breaking API changes in 5.0. It should be safe to use in applications, but furth
This is an API-unstable release intended for gathering feedback about breaking API changes in 5.0. It should be safe to use in applications, but further breaking API changes MAY occur before stabilizing the API for the 5.0.0 release.
Refer to the Upgrade Guide for tips on how to upgrade from 4.x.
impl Future instead of Pin<Box<dyn Future>> to fix Send/Sync bounds (6e583bd03203e42ef712fc90edb57cf5a389f9b7)http to 1.0 and reqwest to 0.12 (408ecab500158145bf249e78a73a8010933bb0e2)base64 to 0.21 (db0ea44657bd6c1130b83ce135ac2691ba091fad)chrono to 0.4.31 (7b667fc29b52392f4c47c07f0923c88847951b50)openidconnect crate in README (7b667fc29b52392f4c47c07f0923c88847951b50)Full Changelog: https://github.com/ramosbugs/oauth2-rs/compare/5.0.0-alpha.2...5.0.0-alpha.3
This is an API-unstable release intended for gathering feedback about breaking API changes in 5.0. It should be safe to use in applications, but furth
This is an API-unstable release intended for gathering feedback about breaking API changes in 5.0. It should be safe to use in applications, but further breaking API changes are expected before stabilizing the API for the 5.0.0 release (e.g., upgrading http to 1.0; see #237).
Refer to the Upgrade Guide for tips on how to upgrade from 4.x.
oauth2::HttpClientError and flatten exports (e.g., oauth2::reqwest instead of oauth2::reqwest::reqwest) (4391eed01c26c3e9e9fd5a14d90f111a02636a4c)spawn_blocking to docs (1fc8188b22eaa055d3eca748964fca5876a448e2)curl as oauth2::curl and ureq as oauth2::ureq when the corresponding Cargo features are enabled (aff74710dd5ef0f5a1dfb4020e4543b497884a03)Full Changelog: https://github.com/ramosbugs/oauth2-rs/compare/5.0.0-alpha.1...5.0.0-alpha.2
This is an API-unstable release intended for gathering feedback about breaking API changes in 5.0. It should be safe to use in applications, but furth
This is an API-unstable release intended for gathering feedback about breaking API changes in 5.0. It should be safe to use in applications, but further breaking API changes are expected before stabilizing the API for the 5.0.0 release (e.g., upgrading http to 1.0; see #237).
Refer to the Upgrade Guide for tips on how to upgrade from 4.x.
Error type and use thiserror's From impl by @MarijnS95 (#238)openidconnect crate) (576f8096914c7da82a5cd8c2253d47541697aa6a)Display output of RequestTokenError::ServerResponse (96c6f9b17b5fdea98a6a7b84bec8e420671342eb)Client endpoints statically via typestates (1d1f4d17ecdf2a3feb565eb1789cc8649cac7705)devicecode and revocation modules private (9d8f11addf819134f15c6d7f03276adb3d32e80b)reqwest-blocking feature (da7d1c51ccfac95b25af67d2e725ae510d185f5b)AsyncHttpClient and SyncHttpClient traits (23b952b23e6069525bc7e4c4f2c4924b8d28ce3a)timing-resistant-secret-traits feature for PartialEq/Hash by @kate-shine (https://github.com/ramosbugs/oauth2-rs/pull/232)Eq for types that already derive PartialEq (b19ad89262af501f53c1b82015046506834c98e9)From instead of Into for newtypes (d9402c42767b35a4c05bc4db3780b1df115b7b24)Display trait for URL types (8bd0ff1e0339c0945871552210b300c05e89c519)map_err() conversions with a From call via the Try operator by @MarijnS95 (#239)csrf_state by @ikehz (#245)prepare_request() methods infallible (8ef74ac5f1415be50b7db5a7a1a0cc23becbe98d)Full Changelog: https://github.com/ramosbugs/oauth2-rs/compare/4.4.2...5.0.0-alpha.1
Enable chrono wasmbind feature to fix panic in WASM environments
wasmbind feature to fix panic in WASM environments (#230)Export device authorization flow types in top-level namespace along with VerificationUriComplete type
VerificationUriComplete typeAdd DeviceAccessTokenRequest::set_max_backoff_interval() method (with default value of 10 seconds) to control max polling backoff in response to HTTP
DeviceAccessTokenRequest::set_max_backoff_interval() method (with default value of 10 seconds) to control max polling backoff in response to HTTP client errors (#216).serde_path_to_error dependency min version (#197)Make new-type constructors const functions
const functions (#186)ureq::http_client use send_bytes() for POST requests to avoid sending Transfer-Encoding: chunked header that certain providers such as Microsoft do not support (#182/#183)RequestTokenError::ServerResponse with DeviceCodeErrorResponseType::ExpiredToken (instead of RequestTokenError::Other) when device access token request times out (#195)Fix stale documentation around async API, along with some RFC links
Fix PKCE documentation link (See ramosbugs/openidconnect-rs#76)
Only use HTTP Basic auth with a client secret (see #176)
Add field getters to Client struct
Client struct (#167)sha2 and hmac dependencies (#174)set_redirect_uri docs typo (#168)reqwest version mentioned in docs (#154)Add add_scopes convenience methods to request objects
add_scopes convenience methods to request objects (#138)set_redirect_uri method to CodeTokenRequest (#144)DeviceAccessTokenRequest::request_async (#152)Fix a couple of doc comments and an error message to say failed instead of Errored.
failed instead of Errored.reqwest to 0.11 and rename feature flag to reqwest. This upgrades tokio to 1.0 and removes support for both the reqwest-010 and reqwest-09 feature flags.futures 0.1 and remove the futures-01 and futures-03 feature flags; only async/await and futures 0.3 are now supported (without requiring any feature flags).Async* traits and move the request_async methods to the underlying *Request structshttp 0.1 to 0.2.std::error::Error instead of failure::Fail.serde_path_to_error::Error<serde_json::Error>> in the RequestTokenError::Parse variant instead of a serde_json::Error to make JSON deserialization errors easier to diagnose.#[non_exhaustive] attribute to AuthType to support non-breaking additions in the future.plain (plaintext) PKCE verifier when the (non-default) pkce-plain feature flag is enabled. Use of this feature is discouraged for security reasons.ureq HTTP client (#119).reqwest client use rustls-tls by default instead of native TLS. This behavior can be overridden using the native-tls feature flag.rust-crypto with hmac in dev-dependenciesThis is the first beta release for the 4.0 major version. No further breaking changes are expected until the next major version.
This is the first beta release for the 4.0 major version. No further breaking changes are expected until the next major version.
rustls-tls (default) and native-tls feature flags for use with reqwest. Previously, enabling the reqwest feature flag would always use rustls. The default behavior is unchanged, but users that disable the default features and wish to continue using rustls may wish to add the rustls-tls feature flag to their Cargo.toml.serde_path_to_error::Error<serde_json::Error>> in the RequestTokenError::Parse variant instead of a serde_json::Error. This change should make JSON deserialization errors easier to diagnose.Fix URI/URL naming inconsistencies (#128). For context, see ramosbugs/openidconnect-rs#39.
set_introspection_url -> set_introspection_uriset_redirect_url -> set_redirect_uriset_revocation_url -> set_revocation_uriHave Client::exchange_device_code, Client::introspect, and Client::revoke_token fail fast with a new ConfigurationError enum when the relevant OAuth2
Client::exchange_device_code, Client::introspect, and Client::revoke_token fail fast with a new ConfigurationError enum when the relevant OAuth2 endpoint hasn't been configured by calling set_device_authorization_url, set_introspection_url, or set_revocation_url, respectively. Previously, an error would not be returned until a call to request/request_async (#127).extra_fields() getter to StandardTokenIntrospectionResponse (#126)Fix inconsistent naming of types related to RFC 7662 Token Introspection (fdab6401aedf3ad4bbd68d2522516b2a8cc78695/#123). This renames the following:
IntrospectRequest to IntrospectionRequest*TokenInspectionResponse to *TokenIntrospectionResponseIntrospectUrl to IntrospectionUrlintrospect_url to introspection_url.Add support for OAuth 2.0 Token Revocation (RFC 7009) (#122).
Special thanks to @ximon18 for contributing this feature.
Add ureq http_client (#119)
Raise minimum supported Rust version (MSRV) to 1.45
reqwest to 0.11 and rename feature flag from reqwest-010 to reqwest. This upgrades tokio to 1.0.#[non_exhaustive] attribute to AuthType to support non-breaking additions in the futureAdd support for the plain (plaintext) PKCE verifier when the (non-default) pkce-plain feature flag is enabled. Use of this feature is discouraged for security reasons.
Add support for OAuth 2.0 Token Introspection.
Special thanks to @jeroenvervaeke for contributing this feature.
Add support for OAuth 2.0 Device Authorization Grant.
Add support for OAuth 2.0 Device Authorization Grant.
Special thanks to @maxdymond for contributing this feature.
Raise minimum supported Rust version to 1.41
reqwest 0.9 (previously enabled via the reqwest-09 feature flag); only the (default) reqwest-010 feature flag is now supportedhttp 0.1 to 0.2futures 0.1 and remove the futures-01 and futures-03 feature flags; only async/await is now supported (without requiring any feature flags)Async* traits and move the request_async methods to the underlying *Request structsstd::error::Error instead of failure::FailSend and Sync trait bounds on error types to improve compatibility with actixreqwest client use rustls-tls instead of the default native TLSserde feature flag on url crate dependencysha2 dependencyrust-crypto with hmac in dev-dependenciesunicode-normalization dependencymaster branch to mainThis version is identical to 3.0.0-alpha.10 but is no longer considered to be a pre-release.
This version is identical to 3.0.0-alpha.10 but is no longer considered to be a pre-release.
Add AuthorizationRequest::set_redirect_url method
AuthorizationRequest::set_redirect_url methodsha2, rand, and base64 dependencieshex 0.4.0 to maintain Rust 1.34 compatibilityAdd Extension variants to BasicTokenType and BasicErrorResponseType enums
Extension variants to BasicTokenType and BasicErrorResponseType enumsreqwest-010 feature flag to use reqwest 0.10http and url cratesThis release is identical to 3.0.0-alpha.7 except that it pins specifically to reqwest version 0.10.0-alpha.2 when the request-010 feature is enabled.
This release is identical to 3.0.0-alpha.7 except that it pins specifically
to reqwest version 0.10.0-alpha.2 when the request-010 feature
is enabled. This prevents Cargo's SemVer functionality from automatically
using reqwest 0.10, with which this crate is not yet compatible.
To support async/await without unconditionally depending on reqwest, renamed the reqwest feature flag to reqwest-09 and added a separate reqwest-010 f
reqwest, renamed the reqwest feature flag to reqwest-09 and added a separate reqwest-010 flag separate from futures-03. The default feature flag remains reqwest-09. Added new docs describing the various HTTP client interfaces.async_internal module from public API (previously included accidentally).async-std dependencyactix-web-oauth2 example in docsAdd from_url constructor to URL-based NewTypes (AuthUrl, TokenUrl, RedirectUrl)
from_url constructor to URL-based NewTypes (AuthUrl, TokenUrl, RedirectUrl)reqwest::{HttpClientError, FutureHttpClientError, AsyncHttpClientError}With the default feature flags, this crate no longer includes async support. To enable legacy async support using futures 0.1, use the futures-01 feat
With the default feature flags, this crate no longer includes async support. To enable legacy async support using futures 0.1, use the futures-01 feature flag in Cargo.toml. To enable async/await support (requires rustc 1.39.0 or newer), use the futures-03 feature.
Special thanks to @marcelbuesing for contributing this support.
The URL-based NewTypes (AuthUrl, TokenUrl, RedirectUrl) no longer accept a Url type in their constructors. Instead, they parse the URLs internally, as well as maintain an unparsed copy of the input string, which is returned by Deref. This avoids the URL canonicalization performed by the url crate (e.g., adding a trailing slash for URLs with no path component). Previously, this canonicalization sometimes caused mismatches when comparing redirect URIs, which are expected to be identical. A parsed version of the URL can still be accessed by using the new .url() method.
Update url crate from 1.0 to 2.1
url crate from 1.0 to 2.1Clone for CsrfTokenRemove PartialEq derivations on secret types (unsafe, non-constant-time comparisons vulnerable to timing attacks)
PartialEq derivations on secret types (unsafe, non-constant-time comparisons vulnerable to timing attacks)Clone for StandardTokenReponserequest_async API for non-code flowsEq and Hash for String new typesStandardTokenResponse::set_expires_in take Duration for consistencyThe 3.0.0-alpha.1 release included a new HTTP client that utilizes the reqwest crate. By default, reqwest follows HTTP redirects. This allows a malici
The 3.0.0-alpha.1 release included a new HTTP client that utilizes the reqwest crate. By default, reqwest follows HTTP redirects. This allows a malicious OAuth2 authorization server to redirect token endpoint requests to arbitrary URLs, including internal addresses reachable from the client. Such a redirect can be used to mount an SSRF attack.
Versions prior to 3.0.0-alpha.1 are not affected. Users of 3.0.0-alpha.1 are encouraged to upgrade to 3.0.0-alpha.2 or a newer release and are discouraged from using any alpha release in a production environment.
Thanks to @d0nutptr for helping to discover this issue!
This release features significant breaking changes from the 2.x release branch:
Experimental new API with support for asynchronous requests and arbitrary HTTP clients.
This release features significant breaking changes from the 2.x release branch:
curl and reqwest are included as HTTP clients; users may implement their own (passed to request or request_async for each token exchange).insecure module has been removed.Promote 2.0.0-beta.3 to 2.0.0.
Promote 2.0.0-beta.3 to 2.0.0.
Derive Eq, Hash for String new types
Add public methods for instantiating TokenResponse and ErrorResponse.
rand pin to 0.6TokenResponse and ErrorResponse.The 2.x API is now stable! No further breaking changes are expected until a future 3.x release.
The 2.x API is now stable! No further breaking changes are expected until a future 3.x release.
This release is a promotion of 2.0.0-alpha.5 to being API stable. It contains no additional changes.
Derive Clone for TokenResponse and ErrorResponse
Make CsrfToken and AuthorizationCode (de)serializable.
- Add PKCE support - Avoid serializing None fields - Add scopes to password grant
Make BasicAuth URL-encode client ID and secret
Minor fixes:
BasicAuth URL-encode client ID and secret (#41)Display + Fail derivation for RequestTokenError<T>Unstable release following major rewrite: this release includes breaking changes!
Unstable release following major rewrite: this release includes breaking changes!
Support for refresh tokens. Thanks @Noskcaj19
Clone trait on Config. Thanks @illicitonionAdded the Serialize trait on Token, TokenError and friends, in case you want to serialize it in your app.
Serialize trait on Token, TokenError and friends, in case you want to serialize it in your app.Allow using basic auth to pass client_id and client_secret. Thanks @euank
client_id and client_secret. Thanks @euankscope for the client credentials grant type. Thansk @euankAllow passing authorization URLs with query parameters (without resetting the query parameters beforehand).
Thanks to @KeenS
Implemented the std::Error trait for TokenError. The *description* of the error is the *display* value of ErrorType (e.g. invalid_request, unauthorize
TokenError. The description of the error is the display value of ErrorType (e.g. invalid_request, unauthorized_client etc.)Thanks to @KeenS
Fixed a bug when setting multiple scopes: the separator should be a single whitespace, not a comma.
A big rewrite: see the docs for more details.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
One column per quarter.