You are viewing Skygear v1 Documentation.Switch to Skygear v0 Documentation

User login with Google

This article teaches you how to setup Google login in your application.

Setup Google project

  1. Log in Google account and select or create project in Google developers console.

    Google select project

  2. In credentials, create OAuth client ID

    Google create oauth client

  3. Complete create client ID form. Make sure Authorized redirect URIs contains following link. Replace ${APP_NAME} with your app name.

    https://${APP_NAME}.skygeario.com/sso/google/auth_handler
    

    Google authorized redirect uris

  4. Save your Client ID and Client Secret from Google developers console.

    Google client id and secret

  5. Go to Skygear portal, User Auth > Social Login. Enable Google in social connections and input your Client ID and Client Secret.

    Google Skygear portal

  6. Select the default permissions from Skygear portal, it will be used when user login with Skygear SDK. You can still overwrite it by providing another set of scope in the SDK call. Scope is required in google login, please select at lease one permission in your setup.

Login with Google through Skygear SDK