AuthConfig constructor
AuthConfig({
- required String table,
- required String emailColumn,
- required String passwordColumn,
- String? nameColumn,
- String? providerColumn,
- String? providerIdColumn,
- String? googleClientId,
- String? googleClientSecret,
- String? githubClientId,
- String? githubClientSecret,
- String? facebookClientId,
- String? facebookClientSecret,
- String? appleClientId,
- String? appleTeamId,
- String? appleKeyId,
- String? applePrivateKey,
- required String redirectBase,
- String? jwtSecret,
- int jwtExpiryHours = 24,
- int accessTokenExpiryMinutes = 60,
- bool enableRefreshTokens = false,
- int refreshTokenExpiryDays = 30,
- bool enableLoginThrottle = false,
- int loginMaxAttempts = 5,
- int loginLockMinutes = 15,
- bool requireEmailVerification = false,
- int passwordMinLength = 6,
Implementation
AuthConfig({
// Database configuration
required this.table,
required this.emailColumn,
required this.passwordColumn,
this.nameColumn,
this.providerColumn,
this.providerIdColumn,
// Google OAuth
this.googleClientId,
this.googleClientSecret,
// GitHub OAuth
this.githubClientId,
this.githubClientSecret,
// Facebook OAuth
this.facebookClientId,
this.facebookClientSecret,
// Apple Sign In
this.appleClientId,
this.appleTeamId,
this.appleKeyId,
this.applePrivateKey,
// Application settings
required this.redirectBase,
this.jwtSecret,
// Security settings
this.jwtExpiryHours = 24,
this.accessTokenExpiryMinutes = 60,
this.enableRefreshTokens = false,
this.refreshTokenExpiryDays = 30,
this.enableLoginThrottle = false,
this.loginMaxAttempts = 5,
this.loginLockMinutes = 15,
this.requireEmailVerification = false,
this.passwordMinLength = 6,
});