module Googl::OAuth2

OAuth 2.0

Google supports three flows of OAuth 2.0

Now, gem googl support only client-side and native application.

Public Instance Methods

native(client_id, client_secret) click to toggle source

OAuth 2.0 for native applications

The native application flow for desktop and mobile applications

client = Googl::OAuth2.native("client_id", "client_secret")
# File lib/googl.rb, line 138
def native(client_id, client_secret)
  Googl::OAuth2::Native.new(client_id, client_secret)
end
server(client_id, client_secret, redirect_uri) click to toggle source

OAuth 2.0 for server-side web applications

The server-side flow for web applications with servers that can securely store persistent information

client = Googl::OAuth2.server("client_id", "client_secret", "redirect_uri")
# File lib/googl.rb, line 128
def server(client_id, client_secret, redirect_uri)
  Googl::OAuth2::Server.new(client_id, client_secret, redirect_uri)
end