rapid-microphone-28570
04/05/2023, 6:07 AMchilly-king-10285
04/05/2023, 6:07 AMchilly-king-10285
04/05/2023, 6:08 AMjavascript import { Configuration, JsonPatch, OAuth2Api } from "@ory/client"; const ory = new OAuth2Api( new Configuration({ basePath: `https://${process.env.ORY_PROJECT_SLUG}.<http://projects.oryapis.com|projects.oryapis.com>`, accessToken: process.env.ORY_API_KEY, }), ); export async function patchOAuth2Client(id: string, patches: JsonPatch[]) { await ory.patchOAuth2Client({ id, jsonPatch: [ ...patches, { op: "replace", path: "access_token_strategy", value: "jwt", }, ], }); }
The setting is also available through the Ory Console under the clients' settings. Source: [https://www.ory.sh/docs/oauth2-oidc/jwt-access-token](https://www.ory.sh/docs/oauth2-oidc/jwt-access-token)rapid-microphone-28570
04/05/2023, 6:10 AM