astonishing-nest-73880
04/27/2024, 9:15 PMchilly-king-10285
04/27/2024, 9:15 PMchilly-king-10285
04/27/2024, 9:15 PMjavascript import { Configuration, OidcApi } from "@ory/client" const ory = new OidcApi( 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 createOidcDynamicClient() { const { data } = await ory.createOidcDynamicClient({ oAuth2Client: { grant_types: ["authorization_code", "refresh_token"], redirect_uris: ["<https://example.com>"], scope: "offline openid", token_endpoint_auth_method: "client_secret_post", }, }) console.log(data.registration_access_token) // Write this down, it is only sent once! console.log(data.client_id, data.client_secret /* ... */) }
The response includes the registration_access_token
which is needed to manage the client. The token will only be shown once! For more details, you can refer to the [API documentation](https://www.ory.sh/docs/reference/api#tag/oAuth2/operation/createOidcDynamicClient). Please note that this operation does not require authentication. As for listing OIDC providers, the provided sources do not contain information on how to do this programmatically via an API. You may want to refer to the full Ory API documentation for more information.astonishing-nest-73880
04/27/2024, 9:22 PMselfservice:
.....
methods:
oidc:
enabled: true
config:
providers:
- .....
chilly-king-10285
04/27/2024, 9:22 PMchilly-king-10285
04/27/2024, 9:22 PMastonishing-nest-73880
04/27/2024, 9:25 PM