ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

New WINDEV Mobile 2024 feature!
Help / WLanguage / WLanguage functions / Mobile specific functions / Phone functions
  • Properties specific to gglAccount variables
  • Prerequisites for using gglAccount
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
The gglAccount type gets the profile information of a Google account via several WLanguage properties.
Remark: A gglAccount variable is initialized when the GglAccountAssociate function is used. This function enables users to log in to an application using a Google account registered on the device, without entering a username and password. See Remarks for the list of prerequisites.
Remark: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable.
Example
GglAccountAssociate(auth)

INTERNAL PROCEDURE auth(RESULT is int, Account is gglAccount)
SWITCH RESULT
CASE gaaCanceled
STC_Auth = "Authentication canceled by the user."
CASE gaaFailed
STC_Auth = "Authentication error" + CR + ErrorInfo()
CASE gaaSuccess
STC_Auth = "Hello " + Account..FirstName + " " + Account..LastName
END
 END
Properties

Properties specific to gglAccount variables

The following properties can be used to manipulate a Google account:
Property nameType usedEffect
EmailCharacter stringEmail address of the user associated with the Google account.
This property is read-only.
FirstNameCharacter stringFirst name of the user associated with the Google account.
This property is read-only.
IDTokenBufferGoogle authentication token.
This property is read-only.
LastNameCharacter stringLast name of the user associated with the Google account.
This property is read-only.
ProfilePictureURI variableProfile picture of the user associated with the Google account.
This property is read-only.
Remarks

Prerequisites for using gglAccount

  1. Create project in the Google Cloud console (https://console.cloud.google.com) or open an existing project.
  2. Click "APIs & Services".
  3. On the "Credentials" tab, click "CREATE CREDENTIALS", then "OAuth Client ID", expand "Application type" and select "Android" (if you don't have an ID of this type yet). Specify your application's package name and SHA-1 signing certificate fingerprint.
    • WINDEV Mobile provides this package name in the first step of the Android application generation wizard.
  4. On the "Credentials" tab, click "CREATE CREDENTIALS", then "OAuth Client ID", expand "Application type" and select "Web application" (if you don't have an ID of this type yet). You can leave the "Authorized JavaScript origins" and "Authorized redirect URIs" empty. This ID represents your "back end" authentication server. This ID must be specified in the Android application generation wizard in WINDEV Mobile.
  5. Optional step: On the "OAuth consent screen" tab, fill in the different fields, and in particular the links to the privacy policy and terms of use.
In the application generation wizard, in "Google One Tap sign-in", enter the client ID.
Minimum version required
  • Version 2024
Comments
Click [Add] to post a comment

Last update: 03/08/2024

Send a report | Local help