Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions auth/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,50 @@ _ = login

Browser placement and proxy location are independent. `browser.region` chooses where the browser runs; the connection's [proxy](/proxies/overview) controls the exit IP that websites see. Regional browsers don't provide a data residency guarantee. See [Regional Browsers](/browsers/regions) for storage and processing details.

## Browser locale

By default, the browsers Managed Auth uses for a connection report an English locale to websites, such as `en-US` in `us-east`. If your users sign in to sites in another language, set `browser.location.locale` on the connection, for example `sv-SE` for Swedish. Sites that choose their language from the browser then show their login page, field labels, and MFA prompts in your user's language.

<CodeGroup>
```typescript TypeScript
const auth = await kernel.auth.connections.create({
domain: 'example.com',
profile_name: 'user-123',
browser: { location: { locale: 'sv-SE' } },
});
```

```python Python
auth = await kernel.auth.connections.create(
domain="example.com",
profile_name="user-123",
browser={"location": {"locale": "sv-SE"}},
)
```

```go Go
auth, err := client.Auth.Connections.New(ctx, kernel.AuthConnectionNewParams{
ManagedAuthCreateRequest: kernel.ManagedAuthCreateRequestParam{
Domain: "example.com",
ProfileName: "user-123",
Browser: kernel.ManagedAuthBrowserConfigParam{
Location: kernel.ManagedAuthBrowserLocationParam{
Locale: kernel.String("sv-SE"),
},
},
},
})
if err != nil {
panic(err)
}
_ = auth
```
</CodeGroup>

The locale applies to every browser the connection uses: the first login, health checks, and automatic reauthentication. Change it with `auth.connections.update`, or set it to `null` to go back to the default.

This is the same `locale` as [browser location](/browsers/location), applied to the connection's browsers. See that page for supported values and how the locale affects the browser.

## SSO/OAuth support

Managed Auth supports common "Sign in with Google/GitHub/Microsoft" flows. The user completes the OAuth flow with the provider, and Kernel saves the authenticated session to the profile. Automatic reauthentication depends on the provider's login requirements. See [Can this connection auto-reauth?](/auth/connection-lifecycle#can-this-connection-auto-reauth) for how Kernel determines eligibility.
Expand Down Expand Up @@ -919,6 +963,7 @@ After creating a connection, you can update its configuration with `auth.connect
| `save_credentials` | Whether to save credentials on successful login |
| `record_session` | Record a [replay](/browsers/replays) of every auth browser session for this connection (logins, health checks, and reauths) |
| `browser.region` | Region for login, health-check, and reauth browsers. Takes effect on the next browser created for the connection |
| `browser.location.locale` | Language for login, health-check, and reauth browsers, such as `sv-SE`. Set to `null` to go back to the region default. Takes effect on the next browser created for the connection |
| `proxy` | Pin login, health-check, and reauth sessions to a proxy. Takes effect on the next health check or reauth |

Only the fields you include are updated—everything else stays the same. Changes to `health_check_interval`, `health_checks`, `auto_reauth`, and `proxy` take effect immediately on the running connection.
Expand Down
2 changes: 1 addition & 1 deletion browsers/location.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -107,5 +107,5 @@ Browser responses include the timezone and locale the browser is using, and whet
- Date and number formatters a page already created keep their original settings. Create a new one, such as `new Intl.DateTimeFormat()`, to use the new values.
- Requests already in progress keep their original language. Later requests use the new one.
- A timezone or locale you set yourself through Playwright or Puppeteer, such as Playwright's `timezoneId`, takes precedence on the pages it applies to.
- The location lasts for the browser session. Profiles don't save it.
- The location lasts for the browser session. Profiles don't save it. [Managed Auth](/auth/configuration#browser-locale) browsers take their locale from the connection instead.
- A pooled browser you release with `reuse: true` keeps its location for the next acquirer, just as it keeps cookies and open tabs. Release it with `reuse: false` to get a fresh browser instead.
Loading