Skip to content

Commit d69aedf

Browse files
committed
feat: custom domain concept and howto.
1 parent 37b3702 commit d69aedf

File tree

6 files changed

+111
-1
lines changed

6 files changed

+111
-1
lines changed

docs/concepts/custom_domain.md

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
id: custom_domain
3+
title: Custom Domain
4+
sidebar_label: Custom Domain
5+
slug: /concepts/custom-domain
6+
description: What is a custom domain
7+
---
8+
9+
A domain translates names into IP addresses, which browsers use to load internet pages. (e.g., "https://crossid.io")
10+
11+
By default login and registration boxes are hosted under the `crossid.io` domain.
12+
13+
Adding a custom domain let you serve the boxes under your own domain.
14+
15+
So instead of a URL such `https://acme.us.crossid.io/auth/login` user will be redirected to `https://acme.io/auth/login`
16+
17+
This has several advantages:
18+
19+
- Branding, your users don't leave your own domain.
20+
- Easy migration between identity services.
21+
- Security and cookie data sharing.

docs/guides/howto/custom_domain.md

+83
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
---
2+
id: custom_domain
3+
title: Add custom domain.
4+
sidebar_label: Custom Domain
5+
slug: /guides/howto/custom_domain
6+
description: How to add a custom domain.
7+
---
8+
9+
A [Custom Domain](/docs/concepts/custom-domain) let you serve login under your own domain.
10+
11+
This page explains how to add a custom domain.
12+
13+
import Tabs from "@theme/Tabs";
14+
import TabItem from "@theme/TabItem";
15+
16+
## Add the domain
17+
18+
<Tabs
19+
defaultValue="console"
20+
values={[
21+
{label: 'Console', value: 'console'},
22+
]}>
23+
<TabItem value="console">
24+
25+
1. In Admin console, navigate to **Branding &rarr; Domains**.
26+
1. Click on **Add Integration**.
27+
1. In the DNS record, put your chosen custom domain.
28+
For example: _auth.acme.io_
29+
1. Click the **Add** button.
30+
31+
</TabItem>
32+
</Tabs>
33+
34+
## Domain validation
35+
36+
For security reasons, we have to ensure that you own the domain,
37+
This requires you to add a TXT record with the given details in your domain entries.
38+
39+
<img src="/img/howto/customdomain_dns_record.png" width="60%"/><br/><br/>
40+
41+
(See below if your DNS provider is Godaddy)
42+
43+
After adding the DNS record, click the **Verify Domain** button.
44+
45+
The domain should be in a _verified_ state.
46+
47+
![verified](/img/howto/customdomain_verified.png)
48+
49+
## Certificate deployment
50+
51+
For SSL to work, a certificate (with its key) should be provided,
52+
53+
Issuing a certificate is beyond the scope of this tutorial.
54+
55+
Once a certificate issued, you should have a PEM file with a full chain certificate and a key.
56+
57+
In the domains action, click the **deploy** button (see screenshow above).
58+
59+
Provide the certificate and key and click deploy.
60+
61+
If everything is okay, the delpoyment state should be green.
62+
63+
Wait a bit for the deployment process to end.
64+
65+
## Use the domain
66+
67+
Refer to your domain instead of _crossid.io_, for example, if your tenant is _acme_, located in US then
68+
69+
OAuth endpoints would be refered to: _https://acme.crossid.io/oauth2/.well-known/openid-configuration_
70+
71+
If your custom domain is _auth.acme.io_, your can refer now to the URL: _https://auth.acme.io/oauth2/.well-known/openid-configuration_ instead.
72+
73+
## DNS Providers
74+
75+
### Godaddy
76+
77+
If your domain is hosted in Godaddy follow these steps:
78+
79+
1. Open https://dcc.godaddy.com/manage/acme.io/dns
80+
1. Put a _TXT_ record with the given _name_ and _value_.
81+
1. Click the **Add Record**.
82+
83+
![godaddy](/img/howto/customdomain_godaddy.png)

sidebars.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,16 @@ module.exports = {
1616
"guides/howto/add_web_app",
1717
"guides/howto/app_user_assignment",
1818
"guides/howto/machine_to_machine",
19+
"guides/howto/custom_domain",
1920
],
2021
},
2122
],
22-
Concepts: ["concepts/tenant", "concepts/application", "concepts/identity"],
23+
Concepts: [
24+
"concepts/tenant",
25+
"concepts/application",
26+
"concepts/identity",
27+
"concepts/custom_domain",
28+
],
2329
"Sample Apps": [
2430
"sample_apps/sample-monorepo",
2531
"sample_apps/sample-nodejs",
143 KB
Loading
82.6 KB
Loading
40.9 KB
Loading

0 commit comments

Comments
 (0)