sign_in_with_apple_server
1.0.0, released a year ago by timm.preetz.xyz
Server-side utilities for Sign in with Apple in Dart
What it does
Provides functions to validate Apple identity tokens, exchange authorization codes for refresh tokens, and revoke user authorizations. It supports Android, web, and native Apple platforms.
AI-written summary of version 1.0.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to implement Sign in with Apple on a Dart backend
- You want to validate identity tokens and manage user sessions
- You need to revoke Apple authorizations from the server
Skip it when
- You only need client-side Sign in with Apple
- You are building a Flutter app without a Dart backend
Strengths
- No external dependencies beyond http and jsonwebtoken
- Supports all platforms that can run Dart
- Handles token validation and refresh flow
Weaknesses
- Limited to Apple sign-in only
- No built-in UI or client integration
- Requires manual handling of private keys
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 3
Add dependency to pubspec, provide Apple private key as a string, call provided methods
```dart
import 'package:sign_in_with_apple_server/sign_in_with_apple_server.dart';
final client = SignInWithAppleServer(
clientId: 'com.example.app',
privateKey: '-----BEGIN PRIVATE KEY-----
<key data>
-----END PRIVATE KEY-----',
keyId: 'ABC123',
);
final token = await client.validateIdentityToken(idToken);
print('User ID: ${token.userId}');
```Alternatives
Packages that do the same job and could replace sign_in_with_apple_server.
- google_sign_in_ios
iOS and macOS implementation of Google Sign-In for Flutter
90Compare - google_sign_in_android
Android implementation of the google_sign_in plugin
88Compare - openid_client
Library for working with OpenID Connect and implementing clients in Dart.
80Compare - sign_in_with_apple
Flutter bridge to initiate Sign in with Apple on iOS, macOS, Android, and Web.
86Compare
Works with
Packages commonly used together with sign_in_with_apple_server: ones it builds on, ones built on it, and its own family.