openid_client
0.4.10+2, released 2 months ago by appsup.be
Library for working with OpenID Connect and implementing clients in Dart.
What it does
Discovers OpenID Provider metadata, parses and validates ID tokens, and provides tools for implementing implicit and authorization code flows.
AI-written summary of version 0.4.10+2, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to authenticate users via OpenID Connect or OAuth2 providers.
- You are building a client for command line, web, or mobile applications using OIDC.
Skip it when
- You exclusively want pre-built platform-native sign-in flows like Firebase Auth or Google Sign-In widgets.
Strengths
- Supports multiple platforms including Android, iOS, web, Windows, macOS, and Linux.
- Implements discovery, ID token validation, and RP initiated logout.
Weaknesses
- Requires manual configuration for non-standard OAuth2 providers.
Setup
- Kind
- Pure Dart
- Effort
- Medium
- Code generation
- No
- Direct dependencies
- 8
Requires defining redirect URIs and setting up the appropriate authentication client for your target platform (IO, browser, etc.).
import 'package:openid_client/openid_client.dart';
main() async {
var issuer = await Issuer.discover(Issuer.google);
var client = new Client(issuer, "client_id", "client_secret");
var f = new Flow.authorizationCode(client);
f.redirectUri = Uri.parse("http://localhost");
print(f.authenticationUrl);
}Alternatives
Packages that do the same job and could replace openid_client.
- google_sign_in
If you specifically need native Google sign-in integration.
84Compare - firebase_auth
If your backend and user management are handled by Firebase.
99Compare
Works with
Packages commonly used together with openid_client: ones it builds on, ones built on it, and its own family.
- webopenid_client depends on itLightweight bindings for browser APIs via JS interop
- clockopenid_client depends on itA fakeable wrapper for dart:core clock APIs.
- argsopenid_client depends on itLibrary for parsing raw command-line arguments into options and values using GNU and POSIX styles.
- loggingopenid_client depends on itProvides configurable logging with levels and stream listeners for Dart apps.
- pointycastleopenid_client depends on itA Dart library providing a wide range of cryptographic algorithms and primitives.
- joseopenid_client depends on itJavascript Object Signing and Encryption library supporting JWE, JWS, JWK and JWT.
- firebase_dartBuilt on openid_clientA pure Dart implementation of Firebase Authentication, Realtime Database, and Cloud Storage.
- serverpod_auth_serverBuilt on openid_clientAuthentication server module for Serverpod backend applications.