billions-minister-2901
04/16/2025, 2:58 PMbrief-egg-61061
04/16/2025, 2:58 PMbrief-egg-61061
04/16/2025, 2:58 PM<http://ory.example.org|ory.example.org>
) instead of the default Ory Network domain (<http://project-slug.projects.oryapis.com|project-slug.projects.oryapis.com>
). ## Setting up a custom domain First, you need to [add a Custom Domain to your Ory Network project](https://www.ory.sh/docs/guides/custom-domains). Once this is set up, you can use your custom domain in your SDK calls. ## Updating SDK configuration After setting up your custom domain, update your SDK configuration to use the new domain. Here are examples for different programming languages: ### JavaScript/TypeScript javascript const ory = new FrontendApi( new Configuration({ basePath: "<https://ory.example.org>", baseOptions: { withCredentials: true, }, }) )
[Getting Started with Express.js](https://www.ory.sh/docs/getting-started/integrate-auth/expressjs#go-to-production) ### Go go c := ory.NewConfiguration() c.Servers = ory.ServerConfigurations{{URL: "<https://ory.example.org>"}}
[Getting Started with Go](https://www.ory.sh/docs/getting-started/integrate-auth/go#go-to-production) ### PHP php $config = Ory\Client\Configuration::getDefaultConfiguration()->setHost("<https://ory.example.org>")); $ory = new Ory\Client\Api\FrontendApi(new GuzzleHttp\Client(), $config);
[Getting Started with PHP](https://www.ory.sh/docs/getting-started/integrate-auth/php#go-to-production) ### .NET csharp var ory = new FrontendApi(new Configuration { BasePath = "<https://ory.example.org>" });
[Getting Started with ASP.NET](https://www.ory.sh/docs/getting-started/integrate-auth/dotnet#go-to-production) ## OAuth2 Issuer URL If you're using OAuth2/OIDC, you might also need to update the issuer URL. You can check and update it using the Ory CLI: bash # Check current issuer URL ory get oauth2-config --project <project-id> --workspace <workspace-id> --format json | jq '.urls.self.issuer' # Update issuer URL ory patch oauth2-config --project <project-id> --workspace <workspace-id> \ --replace '/urls/self/issuer="<https://auth.myexample.org>"'
[Change the OAuth2 issuer URL](https://www.ory.sh/docs/oauth2-oidc/issuer-url) Note that for social sign-in providers, you may also need to update the base redirect URI: bash ory patch identity-config <project-id> \ --add '/selfservice/methods/oidc/config/base_redirect_uri="<https://ory.example.org>"'
[Set custom domain as redirect URL](https://www.ory.sh/docs/identities/sign-in/social-sign-in/redirect-url)