google sso verify code

This block is part of the users group and was last modified in core v14.0.4.

Deprecated This block has been deprecated since v0.0.0, please avoid future use.
google sso verify code Deprecated v14.0.4

Exchange a Google authorization code for user identity. Returns email, name, and a service token for "user exists by service". DEPRECATED from 15.0.1 for signing people in: it takes the client secret on a pin, so the secret sits in the blueprint, in every export of it and in every simulation trace; it reads the id_token without checking Google's signature, which is safe only because the token came straight from Google's token endpoint and wrong for one an app hands over; and "user exists by service" authenticates from a field any blueprint can write. Configure a "Sign in with Google" service provider instead and send the ID token to POST /auth/google: the core verifies it, creates the account on first use and answers with a session. Accounts it creates carry the same google-{id} service token, so existing flows still find them. Still works for flows that only need Google API access tokens.

In pins 4 + flow
  • flow
    flow
  • Client ID required
    value

    Google OAuth Client ID (must match the one used to generate the auth URL)

  • Client Secret required
    value

    Google OAuth Client Secret

  • Code required
    value

    The authorization code returned by Google

  • Redirect URI required
    value

    Must be the same redirect URI used when generating the auth URL

Out pins 11 + flow
  • flow
    flow
  • Email
    value

    The user email address from the SSO provider

  • Name
    value

    The user display name

  • First name
    value

    The user first name

  • Last name
    value

    The user last name

  • Service Token
    value

    Service token in format "{provider}-{id}" for use with "user exists by service" block

  • Provider User ID
    value

    The unique user ID at the SSO provider

  • Access Token
    value

    The OAuth access token for making API calls on behalf of the user

  • Refresh Token
    value

    The OAuth refresh token for obtaining new access tokens

  • Raw Token
    object

    The full decoded ID token claims from the provider

  • Success
    condition

    True if the code was exchanged successfully

  • Error
    value

    Error message if success is false

sso
oauth
google
single sign on
openid
verify
exchange
callback

Version history

Introduced in v14.0.4.

Service documentation

External API reference This block wraps a third-party service. Click here for the service's own documentation of the underlying endpoint.
Back to users Return to the main group to view all sub-groups Back to sso Return to the group to view all blocks within this group