Seamlessly share user sessions between your dashboard and your docs
Create your Info API
Access-Control-Allow-Origin
header (must not be *
)Access-Control-Allow-Credentials
header is true
Configure your Personalization settings
dash.foo.com
, which uses cookie-based session authentication. My dashboard API routes are hosted at dash.foo.com/api
. I want to set up authentication for my docs hosted at docs.foo.com
.
To set up authentication with Mintlify, I create another dashboard endpoint dash.foo.com/api/docs/user-info
which identifies the user using session auth, and responds with their custom data according to Mintlify’s specification. I then add https://docs.foo.com
to the Access-Control-Allow-Origin
allow-list for this route only, and ensure my Access-Control-Allow-Credentials
configuration is set to true
for this route only.
I then go to the dashboard settings and enter https://dash.foo.com/api/docs/user-info
for the API URL field.
dash.foo.com
, which uses cookie-based session authentication. My dashboard API routes are hosted at dash.foo.com/api
. I want to set up authentication for my docs hosted at foo.com/docs
.
To set up authentication with Mintlify, I create another dashboard endpoint dash.foo.com/api/docs/user-info
which identifies the user using session auth, and responds with their custom data according to Mintlify’s specification. I then add https://foo.com
to the Access-Control-Allow-Origin
allow-list for this route only, and ensure my Access-Control-Allow-Credentials
configuration is set to true
for this route only.
I then go to the dashboard settings and enter https://dash.foo.com/api/docs/user-info
for the API URL field.
foo.com/dashboard
, which uses cookie-based session authentication. My dashboard API routes are hosted at foo.com/api
. I want to set up authentication for my docs hosted at foo.com/docs
.
To set up authentication with Mintlify, I create another dashboard endpoint foo.com/api/docs/user-info
which identifies the user using session auth, and responds with their custom data according to Mintlify’s specification.
I then go to the dashboard settings and enter https://foo.com/api/docs/user-info
for the API URL field.