PHPackages                             opauth/google - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. opauth/google

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

opauth/google
=============

Google strategy for Opauth

0.2.2(13y ago)129501.8k↓31.3%123[8 issues](https://github.com/opauth/google/issues)[3 PRs](https://github.com/opauth/google/pulls)2MITPHPPHP &gt;=5.2.0

Since May 23Pushed 2y ago27 watchersCompare

[ Source](https://github.com/opauth/google)[ Packagist](https://packagist.org/packages/opauth/google)[ Docs](http://opauth.org)[ RSS](/packages/opauth-google/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (6)Used By (2)

Opauth-Google
=============

[](#opauth-google)

[Opauth](https://github.com/opauth/opauth) strategy for Google authentication.

Implemented based on  using OAuth 2.0.

Opauth is a multi-provider authentication framework for PHP.

Getting started
---------------

[](#getting-started)

1. Install Opauth-Google:

    ```
    cd path_to_opauth/Strategy
    git clone git://github.com/opauth/google.git Google
    ```

    or

    ```
    composer require opauth/google

    ```
2. Create a Google APIs project at

    - You do not have to enable any services from the Services tab.
    - Make sure to go to **API Access** tab and **Create an OAuth 2.0 client ID**.
    - Choose **Web application** for *Application type*
    - Make sure that redirect URI is set to actual OAuth 2.0 callback URL, usually `http://path_to_opauth/google/oauth2callback`
3. Configure Opauth-Google strategy.
4. Direct user to `http://path_to_opauth/google` to authenticate

Strategy configuration
----------------------

[](#strategy-configuration)

Required parameters:

```
