action
Fires after built-in providers are registered. Hook here to register Facebook, Discord, LinkedIn, Apple, etc.
Example: add_action( 'davo_social_login_after_builtin_providers', function( $registry ) { $registry->register( new OAuth_Provider_Facebook() ); });
Parameters of davo_social_login_after_builtin_providers Parameter Type Description $registry OAuth_Provider_Registry Provider registry.
add_action Copyadd_action ( 'davo_social_login_after_builtin_providers' , 'my_action_callback' , 10 , 1 );
/**
* @param OAuth_Provider_Registry $registry
*/
function my_action_callback ( $registry ) {
// Your code here.
}src/domains/oauth/initializer.php:182
filter
Filter to allow social registration even when general registration is off. Set to true in the admin to allow social-only registration.
Parameters of davo_social_login_allow_registration Parameter Type Description $allow bool Whether to allow social registration. $provider_id string Provider slug.
add_filter Copyadd_filter ( 'davo_social_login_allow_registration' , 'my_filter_callback' , 10 , 2 );
/**
* @param bool $allow
* @param string $provider_id
*/
function my_filter_callback ( $allow , $provider_id ) {
// Change $allow as needed, then return it.
return $allow ;
}src/domains/oauth/repository.php:386
filter
Filters the query parameters of a provider's authorization URL.
Parameters of davo_social_login_auth_params Parameter Type Description $params array<string, string> The query parameters. $provider_id string Provider ID.
Returns array<string, string>
add_filter Copyadd_filter ( 'davo_social_login_auth_params' , 'my_filter_callback' , 10 , 2 );
/**
* @param array<string, string> $params
* @param string $provider_id
*/
function my_filter_callback ( $params , $provider_id ) {
// Change $params as needed, then return it.
return $params ;
}src/domains/oauth/provider-abstract.php:231
action
Fires when seeding a new user's avatar from their social provider's photo fails. Purely informational — the user account and login already succeeded regardless.
Parameters of davo_social_login_avatar_fetch_failed Parameter Type Description $user_id int WordPress user ID. $url string Provider avatar URL that failed. $error WP_Error The resulting error.
add_action Copyadd_action ( 'davo_social_login_avatar_fetch_failed' , 'my_action_callback' , 10 , 3 );
/**
* @param int $user_id
* @param string $url
* @param WP_Error $error
*/
function my_action_callback ( $user_id , $url , $error ) {
// Your code here.
}src/domains/oauth/repository.php:462
filter
Filters whether the sign-in state is bound to the browser with a cookie. On by default. It can be switched off for hosts whose cache strips Set-Cookie from REST responses.
Parameters of davo_social_login_bind_state_to_browser Parameter Type Description $bind bool Whether to bind the state. $provider_id string Provider ID.
Returns bool
add_filter Copyadd_filter ( 'davo_social_login_bind_state_to_browser' , 'my_filter_callback' , 10 , 2 );
/**
* @param bool $bind
* @param string $provider_id
*/
function my_filter_callback ( $bind , $provider_id ) {
// Change $bind as needed, then return it.
return $bind ;
}src/domains/oauth/provider-abstract.php:337
action
Fires after a social connection is unlinked.
Parameters of davo_social_login_connection_unlinked Parameter Type Description $user_id int WordPress user ID. $provider_id string Provider slug.
add_action Copyadd_action ( 'davo_social_login_connection_unlinked' , 'my_action_callback' , 10 , 2 );
/**
* @param int $user_id
* @param string $provider_id
*/
function my_action_callback ( $user_id , $provider_id ) {
// Your code here.
}src/domains/oauth/repository.php:237
action
Fires before linking a new provider to an existing user.
Parameters of davo_social_login_linking_to_existing_user Parameter Type Description $existing WP_User WordPress user. $profile OAuth_Profile Normalized profile.
add_action Copyadd_action ( 'davo_social_login_linking_to_existing_user' , 'my_action_callback' , 10 , 2 );
/**
* @param WP_User $existing
* @param OAuth_Profile $profile
*/
function my_action_callback ( $existing , $profile ) {
// Your code here.
}src/domains/oauth/repository.php:310
filter
Filter the new user data before insertion.
Parameters of davo_social_login_new_user_data Parameter Type Description $user_data array<string, mixed> User data array. $profile OAuth_Profile Normalized provider profile.
add_filter Copyadd_filter ( 'davo_social_login_new_user_data' , 'my_filter_callback' , 10 , 2 );
/**
* @param array<string, mixed> $user_data
* @param OAuth_Profile $profile
*/
function my_filter_callback ( $user_data , $profile ) {
// Change $user_data as needed, then return it.
return $user_data ;
}src/domains/oauth/repository.php:419
filter
Filters whether a social sign-in provider is enabled. Defaults to the provider's own enabled setting, which is off until the owner turns it on.
Parameters of davo_social_login_provider_enabled Parameter Type Description $enabled bool Whether the provider is enabled. $provider_id string Provider ID.
Returns bool
add_filter Copyadd_filter ( 'davo_social_login_provider_enabled' , 'my_filter_callback' , 10 , 2 );
/**
* @param bool $enabled
* @param string $provider_id
*/
function my_filter_callback ( $enabled , $provider_id ) {
// Change $enabled as needed, then return it.
return $enabled ;
}src/domains/oauth/provider-abstract.php:143
action
Fires when the social provider registry is ready to accept registrations.
Parameters of davo_social_login_register_providers Parameter Type Description $registry OAuth_Provider_Registry The registry instance.
add_action Copyadd_action ( 'davo_social_login_register_providers' , 'my_action_callback' , 10 , 1 );
/**
* @param OAuth_Provider_Registry $registry
*/
function my_action_callback ( $registry ) {
// Your code here.
}src/domains/oauth/provider-registry.php:61
filter
Filters whether the provider's tokens are stored with the sign-in connection. Defaults to false.
Parameters of davo_social_login_store_provider_tokens Parameter Type Description $store bool Whether to store the tokens. $profile \OAuth_Profile The normalized provider profile. $user_id int The connected user's ID.
Returns bool
add_filter Copyadd_filter ( 'davo_social_login_store_provider_tokens' , 'my_filter_callback' , 10 , 3 );
/**
* @param bool $store
* @param \OAuth_Profile $profile
* @param int $user_id
*/
function my_filter_callback ( $store , $profile , $user_id ) {
// Change $store as needed, then return it.
return $store ;
}src/domains/oauth/repository.php:500
action
Fires after a successful social login.
Parameters of davo_social_login_success Parameter Type Description $user WP_User The authenticated user. $profile OAuth_Profile Normalized provider profile. $provider_id string Provider slug.
add_action Copyadd_action ( 'davo_social_login_success' , 'my_action_callback' , 10 , 3 );
/**
* @param WP_User $user
* @param OAuth_Profile $profile
* @param string $provider_id
*/
function my_action_callback ( $user , $profile , $provider_id ) {
// Your code here.
}src/domains/oauth/repository.php:159
filter
Filters the key material used to derive the AES-256-GCM key for encrypting stored provider access/refresh tokens.
Return raw key material of any length (it is hashed down to 32 bytes) — not the final key itself.
Parameters of davo_social_login_token_encryption_key_material Parameter Type Description $default_material string Default material (WP's AUTH_KEY + SECURE_AUTH_KEY salt).
add_filter Copyadd_filter ( 'davo_social_login_token_encryption_key_material' , 'my_filter_callback' , 10 , 1 );
/**
* @param string $default_material
*/
function my_filter_callback ( $default_material ) {
// Change $default_material as needed, then return it.
return $default_material ;
}src/domains/oauth/database.php:573
action
Fires after a new user is created via social login.
Parameters of davo_social_login_user_created Parameter Type Description $user WP_User Newly created user. $profile OAuth_Profile Normalized provider profile.
add_action Copyadd_action ( 'davo_social_login_user_created' , 'my_action_callback' , 10 , 2 );
/**
* @param WP_User $user
* @param OAuth_Profile $profile
*/
function my_action_callback ( $user , $profile ) {
// Your code here.
}src/domains/oauth/repository.php:476