ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

New WINDEV, WEBDEV and WINDEV Mobile 2025 feature!
Help / WLanguage / WLanguage functions / Communication / Managing the OAuth 2.0 protocol
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Logs out a user previously authenticated via the OAuth 2.0 protocol on any Web service.
Remarks:
  • The logout opens a browser (as for the login). The redirect URL is called when the logout is performed. To log in again, the user will have to go through the entire login process.
  • When you use a variable of type OAuth2Parameters, you need to specify the logout URL with the LogoutURL property.
Example
OAuth2Params is OAuth2Parameters
OAuth2Params.ClientID = "01234567890123456789" 
OAuth2Params.ClientSecret = "98765432109876543210"
OAuth2Params.AuthURL = "https://www.dropbox.com/oauth2/authorize"
OAuth2Params.TokenURL = "https://api.dropboxapi.com/oauth2/token"
OAuth2Params.AdditionalParameters = "force_reapprove=false"
<COMPILE IF ConfigurationType<>Site>
	// If you are not using a website, you need to specify a localhost redirect URL
	OAuth2Params.RedirectionURL = "http://localhost:9874/"
<END>

// Authentication request: opens the login window
MyToken is AuthToken = AuthIdentify(OAuth2Params)
IF ErrorOccurred THEN
	Error(ErrorInfo(errFullDetails))
	RETURN
END

//Disconnect
MyToken.Logout()
Syntax

Logging out a user previously authenticated using OAuth 2.0 Hide the details

<Result> = <Access token>.Logout()
<Result>: Boolean
  • True if the logout was performed,
  • False otherwise.
<Access token>: AuthToken variable
Name of the AuthToken variable corresponding to the access token.

Logging out a user previously authenticated using OAuth 2.0 (asynchronous syntax) Hide the details

<Access token>.Logout(<WLanguage procedure>)
<Access token>: AuthToken variable
Name of the AuthToken variable corresponding to the access token.
<WLanguage procedure>: Procedure name
Optional WLanguage procedure to be called when the logout is performed. This procedure has the following format:
<ProcedureName>(<Logout>)
where <Logout> is a boolean indicating whether or not the logout has been performed (True or False, respectively).
Component: wd300ggl.dll
Minimum version required
  • Version 2025
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 12/17/2024

Send a report | Local help