Giter VIP home page Giter VIP logo

google-oauth2's Introduction

google-oauth2.0

Small simple FPC library for implementing Google OAuth 2.0

This can be used to do XOAUTH2 for sending mail via GMail

Requirements

  • FPC 2.6.4+ (others untested)
  • Synapse
  • libeay32.dll
  • libssl32.dll
  • ssleay32.dll

How does it work?

First of all, for your own project you'll need to create your own credentials. (the ones provides here show its own title-header during authentication)

https://developers.google.com/identity/protocols/OpenIDConnect#getcredentials

  • Create a project
  • Enable the GMail and Google+ Api
  • Set the details in "Consent screen"
  • Create credentials for a "Installed application"
  • And use the Client ID and Client secret in the example application

Currently the provided credentials do work for the test-application.

Note: The sope for composing mail https://www.googleapis.com/auth/gmail.compose is not enhough to mail via smtp. Smtp access requires full mail-access.

Further Resources

Synapse requirement

For communication Synapse from Ararat is used. You can download the latest version from https://sourceforge.net/p/synalist/code/HEAD/tree/trunk/ (at the top-right is a "Download snapshot"-button. Put it somewhere and in Lazarus you can choose "Package" > "Open package file". Browse to the folder for synapse and choose laz_synapse.lpk. Extra step is to add the ssl_openssl.pas before compiling for HTTPS access. You don't need to install anything. laz_synapse will now be available as package. You also need the openssl DLLs in your project directory (or search-path). libeay32.dll, libssl32.dll and ssleay32.dll.

Todo

  • Improve the documentation and comments
  • Create a TDataset-like descendant for Calendar and EMail access

google-oauth2's People

Contributors

rvk01 avatar jabounet avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.