GitHubProviderOptions class
Configuration for the GitHub OAuth provider.
Callback URL
https://example.com/auth/callback/github
Usage
import 'package:routed/auth.dart';
import 'package:routed/auth/providers/github.dart';
final manager = AuthManager(
AuthOptions(
providers: [
githubProvider(
GitHubProviderOptions(
clientId: env('GITHUB_CLIENT_ID'),
clientSecret: env('GITHUB_CLIENT_SECRET'),
redirectUri: 'https://example.com/auth/callback/github',
),
),
],
),
);
Notes
- Uses OAuth 2.0 Authorization Code flow.
- When GitHub does not return a public email, the provider calls
GET /user/emailsand selects the primary email. - For GitHub Enterprise Server, set enterpriseBaseUrl.
Constructors
Properties
- clientId → String
-
final
- clientSecret → String
-
final
- enterpriseBaseUrl → String?
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- redirectUri → String
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
scopes
→ List<
String> -
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited