Files
genai-toolbox/docs/en/resources/authServices/google.md
Yuan 04cb5fbc3e feat!: deprecate authsource in favor of authservice (#297)
Rename existing `authSource` to `authService` through deprecation.
`AuthService` more clearly distinguishes it from `Sources` objects.

`authSources` will be converted into `authServices` after the
unmarshalling process. A warning log is shown if `authSources` are used
(for both within tools parameters and defining auth services):
```
2025-02-20T13:57:51.156025-08:00 WARN "`authSources` is deprecated, use `authServices` for parameters instead"
2025-02-20T13:57:51.156569-08:00 WARN "`authSources` is deprecated, use `authServices` instead"
2025-02-20T13:57:52.047584-08:00 INFO "Initialized 1 sources."
...
```

The manifest generated will continue to use `authSources` to keep
compatibility with the sdks:
```
{
"serverVersion":"0.1.0",
"tools":{
  "test_tool2":{
    "description":"Use this tool to test\n",
    "parameters":[{
      "name":"user_id",
      "type":"string",
      "description":"Auto-populated from Google login",
      "authSources":["my-google-auth"]
      }]
    }
  }
}
```



Test cases with `authSources` are kept for compatibility. Will be
removed when `authSources` are no longer supported.
2025-02-21 18:36:04 -08:00

1.8 KiB

title, type, weight, description
title type weight description
Google Sign-In docs 1 Use Google Sign-In for Oauth 2.0 flow and token lifecycle.

Getting Started

Google Sign-In manages the OAuth 2.0 flow and token lifecycle. To integrate the Google Sign-In workflow to your web app follow this guide.

After setting up the Google Sign-In workflow, you should have registered your application and retrieved a Client ID. Configure your auth service in with the Client ID.

Behavior

Authorized Invocations

When using Authorized Invocations, a tool will be considered authorized if it has a valid Oauth 2.0 token that matches the Client ID.

Authenticated Parameters

When using Authenticated Parameters, any claim provided by the id-token can be used for the parameter.

Example

authServices:
  my-google-auth:
    kind: google
    clientId: YOUR_GOOGLE_CLIENT_ID

Reference

field type required description
kind string true Must be "google".
clientId string true Client ID of your application from registering your application.