FacebookProviderOptions class
Configuration for the Facebook OAuth provider.
Callback URL
https://example.com/auth/callback/facebook
Usage
import 'package:server_auth/server_auth.dart';
import 'package:server_auth/server_auth.dart';
final manager = AuthManager(
AuthOptions(
store: InMemoryAuthStore(),
storeMode: AuthStoreMode.ephemeral,
providers: [
facebookProvider(
FacebookProviderOptions(
clientId: env('FACEBOOK_APP_ID'),
clientSecret: env('FACEBOOK_APP_SECRET'),
redirectUri: 'https://example.com/auth/callback/facebook',
),
),
],
),
);
Constructors
-
FacebookProviderOptions({required String clientId, required String clientSecret, required String redirectUri, List<
String> scopes = const ['email', 'public_profile']}) -
Creates a new FacebookProviderOptions configuration.
const
Properties
- clientId → String
-
Facebook App ID.
final
- clientSecret → String
-
Facebook App Secret.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- redirectUri → String
-
The URI to redirect to after authentication.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
scopes
→ List<
String> -
OAuth scopes to request. Defaults to
['email', 'public_profile'].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