#oidc #web-programming #http-request

tiny_google_oidc

Tiny library for Google's OpenID Connect

1 unstable release

Uses new Rust 2024

new 0.1.0 Mar 22, 2025

#697 in Authentication

Download history 77/week @ 2025-03-17

77 downloads per month

MIT license

61KB
1K SLoC

tiny_google_oidc

Tiny library for Google's OpenID Connect.
Implementation in server flow
google document

Feature

  • Generate a CSRF Token
  • Generate an authentication request URL (code) for Google
  • Verify CSRF token and retrieve id_token
  • Exchange code for id_token (using reqwest)
  • Decode id_token (Base64URLDecode) to get user information
  • Refresh access token using refresh token (using reqwest)
  • Revoke access/refresh token (using reqwest)

Caution

This library is designed for direct communication with Google over HTTPS.
It does not validate the id_token when converting it to a JWT,
so the id_token cannot be passed to other components of your app. See document

Contributing

We are currently working on the contribution guidelines.
Please stay tuned, and thank you for your interest!

License

tiny_google_oidc is provided under the MIT license.See LICENSE

Dependencies

~6–18MB
~231K SLoC