ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Controls, pages and windows / User Groupware functions
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
gpwAddAuthLogin (Function)
In french: gpwAjouteAuthLogin
Adds a login button that represents a type of authentication (Facebook, Google, Microsoft, etc.) for the User Groupware in the login window or page.
Remarks:
  • This setting is only allowed if the User Groupware is configured for manual run.
  • It is necessary to have previously registered the application in each service used.
Example
// Se connecter avec Google
GoogleOpenIDParams is OpenIDParameters
GoogleOpenIDParams.ClientID = "106034950???????.apps.googleusercontent.com" 
GoogleOpenIDParams.ClientSecret = "oBTQL??????MpiM"
gpwAddAuthLogin(GoogleOpenIDParams, gpwGoogle)

// Se connecter avec Facebook
FacebookOAuthParams is OAuth2Parameters
FacebookOAuthParams.ClientID = "1702?????741"
FacebookOAuthParams.ClientSecret = "badf00d?????1ce8ecd"
gpwAddAuthLogin(FacebookOAuthParams, gpwFacebook)

// Se connecter avec mon domaine perso
PersoOpenIDParams is OpenIDParameters
PersoOpenIDParams.ClientID = "1745?????4741"
PersoOpenIDParams.ClientSecret = "dbeefba?????1ce8ecd"
gpwAddAuthLogin(PersoOpenIDParams, "DomainePerso", fExeDir() + "\domaineperso.png")

// Ouvre la fenêtre de login du groupware utilisateur 
nRes is int = gpwOpen()
// Si le login a échoué 
IF nRes <> gpwOk THEN 
	SWITCH nRes 
		CASE gpwCancel : Info("Vous avez cliqué sur le bouton Annuler.")
		CASE gpwError : Error("Erreur à l'initialisation du groupware.")
		CASE gpwUnknownUser : Error("Utilisateur inconnu.")
		CASE gpwInvalidPassword : Error("Mot de passe invalide.")
	END 
	EndProgram()
END 
// Récupération du prénom de l'utilisateur 
Prénom is string = gpwGetUserInfo(gpwInfoFirstName)
Info("Bienvenue, " + Prénom)
Syntax

Adding a login button to one of the services available by default Hide the details

gpwAddAuthLogin(<Type of authentication> , <Type>)
<Type of authentication>: OAuth2Parameters variable or OpenIDParameters variable
  • Name of a variable of type OAuth2Parameters to authenticate to a web service that uses OAuth 2.0.
  • Name of a variable of type OpenIDParameters to authenticate to a web service that uses OpenID.
Note: the properties URLAuth, URLRedirection and URLToken are optional. The default URLs are used.
<Type>: Integer constant
Type of web service to use:
gpwFacebookUse of a Facebook account.
gpwGoogleUse of a Google Account.
gpwMicrosoftUse of a Microsoft account.
gpwSalesforceUse of a Salesforce account.
gpwYahooUse of a Yahoo account.

Adding a custom login button Hide the details

gpwAddAuthLogin(<Type of authentication> , <Caption> [, <Image>])
<Type of authentication>: OAuth2Parameters variable or OpenIDParameters variable
  • Name of a variable of type OAuth2Parameters to authenticate to a web service that uses OAuth 2.0.
  • Name of a variable of type OpenIDParameters to authenticate to a web service that uses OpenID.
<Caption>: Character string
Caption of the service displayed in the button.
<Image>: Optional character string
Name and path of the image file that corresponds to the service logo.
  • This image can be in one of the following formats: .ICO, .PNG, .JPG, .GIF.
  • Its dimensions must be 24 x 24 pixels.
Business / UI classification: Neutral code
Component: wd300gpu.dll
Minimum version required
  • Version 24
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/27/2025

Send a report | Local help