Search code examples
oauthgoogle-apigoogle-oauthgoogle-apps

Getting Google Client ID and Client Secret for OAuth


I'm working with a company that is using the Google Apps free subscription. This company has a web site. They want to let users who have Google Apps accounts in their domain to authenticate into the web site via OAuth.

My question is, where do I find the ClientId and ClientSecret needed to do OAuth?

Thank you!


Solution

  • OAuth 2.0 for Client-side Web Applications will allow you to authenticate users using Oauth2. This will allow the users to grant your application access to their private data.

    You will need to go to Google Developer console and create credentials on this page Credentials

    1. Open the Credentials page in the API Console.

    2. Click Create credentials > OAuth client ID.

    3. Complete the form. Set the application type to Web application. Applications that use JavaScript to make authorized Google API requests must specify authorized JavaScript origins. The origins identify the domains from which your application can send API requests.