oauthSignUp
Inscription de l'utilisateur (autorisation) via OAUTH. Cela renvoie une promesse qui se résout en un objet IAuthEntity.
Description
La méthode accepte le corps comme paramètre.
AuthProvider.oauthSignUp(
marker,
body,
body.client_id,
body.client_secret,
body.code,
body.grant_type,
body.redirect_uri,
langCode
);
Schéma des paramètres
Schéma
marker(obligatoire) : string
L'identifiant texte du fournisseur d'autorisation
exemple : "email"
body(obligatoire) : IOAuthSignUpData
L'objet contient les informations OAuth pour l'inscription
exemple :
{
"client_id": "34346983-luuct343473qdkqidjopdfp3eb3k4thp.apps.googleusercontent.com",
"client_secret": "43434343434",
"code": "4/0AVMBsJgwewewewewewei4D7T6E_fbswxnL3g",
"grant_type": "authorization_code",
"redirect_uri": "http://localhost:3000"
}
body.client_id(obligatoire) : string
L'ID client pour l'application OAuth.
exemple : "34346983-luuct343473qdkqidjopdfp3eb3k4thp.apps.googleusercontent.com"
body.client_secret(obligatoire) : string
Le secret client pour l'application OAuth.
exemple : "43434343434"
body.code(obligatoire) : string
Le code d'autorisation reçu du fournisseur OAuth.
exemple : "4/0AVMBsJgwewewewewewei4D7T6E_fbswxnL3g"
body.grant_type(obligatoire) : string
Le type de subvention pour la demande OAuth.
exemple : "authorization_code"
body.redirect_uri(obligatoire) : string
L'URI de redirection pour l'application OAuth.
exemple : "http://localhost:3000"
langCode : string
Code de langue. Par défaut : "en_US"
exemple : "en_US"
Exemples
Exemple minimal
const body = {
"client_id": "34346983-luuct343473qdkqidjopdfp3eb3k4thp.apps.googleusercontent.com","client_secret": "43434343434","code": "4/0AVMBsJgwewewewewewei4D7T6E_fbswxnL3g","grant_type": "authorization_code","redirect_uri": "http://localhost:3000"}
const response = await AuthProvider.oauthSignUp('email', body)