Site Map Contact Us Home
E-mail Newsletter
Subscribe to get informed about
Clever Components news.

Your Name:
Your Email:
Previous Newsletters

Products Articles Downloads Order Support
Customer Portal      


Features | Detailed Description

The OAuth is a component from the Clever Internet Suite library.

The OAuth component is used to authorize a client and provide an authorization string used in future requests.

Available in VCL edition.


  • Can be used in Desktop applications and Web applications
  • Accept redirection from an OAuth server page
  • Enter an authorization code directly in a form
  • Can work with any Web service that supports OAUTH 2.0
  • Free one year upgrades and support

Desktop applications

The OAuth component allows opening an external web browser and authorize at OAuth server. After authorizing The component starts an embedded web server that accepts the redirection from an OAuth server page after completing the authorization process. The authorization code is automatically extracted from the redirection URL and used for exchanging for an access token.

// [Delphi]
clOAuth1.AuthorizationFlow := afAuthCodeFlow;
clOAuth1.AuthorizationEndPoint := apLocalWebServer;

clOAuth1.AuthURL := '';
clOAuth1.TokenURL := '';
clOAuth1.RedirectURL := 'http://localhost';
clOAuth1.ClientID := '421475.......';
clOAuth1.ClientSecret := '_4HJyA.......';
clOAuth1.Scope := '';

clSmtp1.Server := '';
clSmtp1.Port := 587;
clSmtp1.UseTLS := ctExplicit;
clSmtp1.UserName := 'user @';

clSmtp1.Authorization := clOAuth1.GetAuthorization();


Web applications

This authorization is used by web applications and allows implementing the OAuth authorization in a website.

// [Delphi]
clOAuth1.AuthorizationFlow := afAuthCodeFlow;
clOAuth1.AuthorizationEndPoint := apWebApplication;

oauth.AuthURL := '';
oauth.TokenURL := '';
oauth.RedirectURL := '';
oauth.ClientID := '1990c2cdd.....';
oauth.ClientSecret := '4888dfbd3840......';
oauth.Scope := 'access_yandex_disk';

auth_url := oauth.GetAuthorizationUrl();
//use the auth_url in your Web application for authorizing the Web session.


auth_string := oauth.GetAuthorization(request_uri);
//use this method for obtaining the required authorization string
//the request_uri is the redirect URL from an authorization service

Samples, including WinForm clients with full source code

Please see the Demos code (GMailSMTP, GMailIMAP) and also the indexed Help documentation provided with the Clever Internet Suite installation to learn more about using this component in your application.

Includes support for Delphi, C++Builder.

Complete Delphi source code

When Purchasing the Clever Internet Suite you receive the full sources for all suite components and also free unlimited support.


    Copyright © 2000-2021