The Perl and Raku Conference 2025: Greenville, South Carolina - June 27-29 Learn more

NAME

RT::Authen::OAuth2::Google - Handler for Google OAuth2 logins

Example Metadata

Configuring Google

    Set up a Google Developer's console associated with your organization's Google account. See https://console.developers.google.com

    Create a project. Under Credentials, create an OAuth Client ID, and select Web Application. Enter your Authorized Redirect URI in this form:

    The path /NoAuth/OAuthRedirect must be exactly as listed here, but you should change your protocol and domain to match your configuration.

    Make a note of the Client ID and Client secret listed on this page. You will need to put these in your RT_SiteConfig.pm - documentation is in the etc/OAuth_Config.pm file in this module.

    Click Create. Note if you edit the URI later, you may need to click Save twice. The Google user interface is a bit finicky.

Metadata()

    Takes one scalar string arg, containing the decoded response from the protected resource server. Returns a hash containing key/value pairs of user profile metadata items. Google returns JSON.