AuthenticationFireSocialConfig constructor
AuthenticationFireSocialConfig({
- required Uri loginCredentialsAPIendpoint(),
- required Uri signupCredentialsAPIendpoint(),
- FutureOr<
AuthenticationData> customLoginResponseParser(- String response
- FutureOr<
User> ? customUserMapper()?, - Uri refreshTokenAPIendpoint(
- String refreshToken,
- JWT token
- bool debug = false,
- FutureOr<
Map< customLoginRequestMapper()?,String, dynamic> > - FutureOr<
AuthenticationData> ? customSignupCredentialsResponseParser(- String body
- bool authenticateOnSignup = true,
- FutureOr<
AuthCredentialsProvider> customAutoSignupAuthClbk(- AuthSignUpPayload payload,
- AuthenticationData? authData
- Uri fetchUserInformationAPIendpoint(
- AuthenticationData data
- FutureOr<
Map< customFetchUserInformationResponseMapper()?,String, dynamic> > - bool initialAuthCheckedAfterUserFetch = true,
- bool autoLogoutOnSessionExpired = true,
- Duration? maxAge,
- FutureOr<
Map< customRefreshTokenResponseParser(String, String> >- String body
- void onRefreshToken()?,
- String? refreshTokenMethod,
- FutureOr<
String> customRefreshTokenRequestBodyMapper()?, - Duration? refreshTokenTimeout,
- void onRefreshTokenFailure()?,
- required Uri deleteAccountApiEndpoint(
- String userId
- User? deleteAccountCustomResponseParser()?,
- bool logoutAfterDelete = true,
- FutureOr<
Map< customRefreshTokenCallback()?,String, String> > - Uri authenticateAppleAPIendpoint(
- SocialProviderResponse socialData
- Uri authenticateFacebookAPIendpoint(
- SocialProviderResponse socialData
- Uri authenticateGoogleAPIendpoint(
- SocialProviderResponse socialData
- Uri authenticateAnonymouslyAPIendpoint(
- SocialProviderResponse socialData
- Uri setupUserFieldsAPIendpoint(
- AuthenticationData authenticationData
- FutureOr<
Map< customAuthenticationAppleRequestMapper(String, String> >- SocialProviderResponse socialData,
- AuthDeviceInfo? authDeviceInfo
- FutureOr<
Map< customAuthenticationFacebookRequestMapper(String, String> >- SocialProviderResponse socialData,
- AuthDeviceInfo? authDeviceInfo
- FutureOr<
Map< customAuthenticationGoogleRequestMapper(String, String> >- SocialProviderResponse socialData,
- AuthDeviceInfo? authDeviceInfo
- FutureOr<
Map< customAuthenticationAnonymousRequestMapper(String, String> >- SocialProviderResponse socialData,
- AuthDeviceInfo? authDeviceInfo
- FutureOr<
Map< customSetupFieldsUserRequestMapper(String, String> >- AuthSignUpPayload payload,
- AuthenticationData authData
- FutureOr<
AuthenticationData> customAuthenticationGoogleResponseParser(- String response
- FutureOr<
AuthenticationData> customAuthenticationAppleResponseParser(- String response
- FutureOr<
AuthenticationData> customAuthenticationFacebookResponseParser(- String response
- FutureOr<
AuthenticationData> customAuthenticationAnonymousResponseParser(- String response
- FutureOr<
AuthenticationData> customSetupFieldsUserResponseParser(- String response
- bool shouldDeleteOnFirebase = false,
Implementation
AuthenticationFireSocialConfig({
required super.loginCredentialsAPIendpoint,
required super.signupCredentialsAPIendpoint,
super.customLoginResponseParser,
super.customUserMapper,
super.refreshTokenAPIendpoint,
super.debug = false,
super.customLoginRequestMapper,
super.customSignupCredentialsResponseParser,
super.authenticateOnSignup = true,
super.customAutoSignupAuthClbk,
super.fetchUserInformationAPIendpoint,
super.customFetchUserInformationResponseMapper,
super.initialAuthCheckedAfterUserFetch = true,
super.autoLogoutOnSessionExpired = true,
super.maxAge,
super.customRefreshTokenResponseParser,
super.onRefreshToken,
super.refreshTokenMethod,
super.customRefreshTokenRequestBodyMapper,
super.refreshTokenTimeout,
super.onRefreshTokenFailure,
required super.deleteAccountApiEndpoint,
super.deleteAccountCustomResponseParser,
super.logoutAfterDelete,
super.customRefreshTokenCallback,
// own class props
this.authenticateAppleAPIendpoint,
this.authenticateFacebookAPIendpoint,
this.authenticateGoogleAPIendpoint,
this.authenticateAnonymouslyAPIendpoint,
this.setupUserFieldsAPIendpoint,
this.customAuthenticationAppleRequestMapper,
this.customAuthenticationFacebookRequestMapper,
this.customAuthenticationGoogleRequestMapper,
this.customAuthenticationAnonymousRequestMapper,
this.customSetupFieldsUserRequestMapper,
this.customAuthenticationGoogleResponseParser,
this.customAuthenticationAppleResponseParser,
this.customAuthenticationFacebookResponseParser,
this.customAuthenticationAnonymousResponseParser,
this.customSetupFieldsUserResponseParser,
this.shouldDeleteOnFirebase = false,
}) {
if (authenticateAppleAPIendpoint == null &&
authenticateFacebookAPIendpoint == null &&
authenticateGoogleAPIendpoint == null &&
authenticateAnonymouslyAPIendpoint == null) {
throw InvalidAdvancedAuthConfigurationException(
"You must specify at least one social endpoint of: [authenticateAppleAPIendpoint, authenticateFacebookAPIendpoint, authenticateGoogleAPIendpoint, authenticateAnonymouslyAPIendpoint]",
);
}
}