You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: advanced/user-auth/jwt.mdx
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ If you don’t have a dashboard, or if you want to keep your dashboard and docs
9
9
10
10
<Steps>
11
11
<Steptitle="Generate a private key">
12
-
Go to your [Mintlify dashboard settings](https://dashboard.mintlify.com/settings/integrations) and generate a private key. Store this key somewhere secure where it can be accessed by your backend.
12
+
Go to your [Mintlify dashboard settings](https://dashboard.mintlify.com/mintlify/mintlify/settings/deployment/user-authentication) and generate a private key. Store this key somewhere secure where it can be accessed by your backend.
13
13
</Step>
14
14
<Steptitle="Create a login flow">
15
15
Create a login flow that does the following:
@@ -19,7 +19,7 @@ If you don’t have a dashboard, or if you want to keep your dashboard and docs
19
19
- Create a redirect URL back to your docs, including the JWT as the hash
20
20
</Step>
21
21
<Steptitle="Configure your User Auth settings">
22
-
Return to your [Mintlify dashboard settings](https://dashboard.mintlify.com/settings/integrations) and add the login URL to your User Auth settings.
22
+
Return to your [Mintlify dashboard settings](https://dashboard.mintlify.com/mintlify/mintlify/settings/deployment/user-authentication) and add the login URL to your User Auth settings.
description: 'Integrate with your OAuth server to enable user login via the PKCE flow'
4
+
---
5
+
6
+
If you have an existing OAuth server that supports the PKCE flow, you can integrate with Mintlify for a seamless login experience.
7
+
8
+
## Implementation
9
+
10
+
<Steps>
11
+
<Steptitle="Create your Info API">
12
+
Create an API endpoint that can be accessed with an OAuth access token, and responds with a JSON payload following the [UserInfo](./sending-data) format. Take note of the scope or scopes required to access this endpoint.
13
+
</Step>
14
+
<Steptitle="Configure your User Auth settings">
15
+
Go to your [Mintlify dashboard settings](https://dashboard.mintlify.com/mintlify/mintlify/settings/deployment/user-authentication), select the OAuth option, and fill out the required fields:
16
+
17
+
-**Authorization URL**: The base URL for the authorization request, to which we will add the appropriate query parameters.
18
+
-**Client ID**: An ID for the OAuth 2.0 client to be used.
19
+
-**Scopes**: An array of scopes that will be requested.
20
+
-**Token URL**: The base URL for the token exchange request.
21
+
-**Info API URL**: The endpoint that will be hit to retrieve user info.
22
+
</Step>
23
+
<Steptitle="Configure your OAuth client">
24
+
Copy the Redirect URL listed in the [Mintlify dashboard settings](https://dashboard.mintlify.com/mintlify/mintlify/settings/deployment/user-authentication) and add it as an authorized redirect URL for your OAuth server.
25
+
</Step>
26
+
</Steps>
27
+
28
+
## Example
29
+
30
+
I have an existing OAuth server that supports the PKCE flow. I want to set up authentication for my docs hosted at `foo.com/docs`.
31
+
32
+
To set up authentication with Mintlify, I create an endpoint `api.foo.com/docs/user-info` which requires an OAuth access token with the `docs-user-info` scope, and responds with the user's custom data according to Mintlify’s specification.
33
+
34
+
I then go to the Mintlify dashboard settings, navigate to the User Auth settings, select OAuth, and enter the relevant values for the OAuth flow and Info API endpoint:
-**Info API URL**: `https://api.foo.com/docs/user-info`
40
+
41
+
Finally, I copy the Redirect URL displayed in the dashboard settings and add it as an authorized redirect URL in my OAuth client configuration settings.
Copy file name to clipboardExpand all lines: advanced/user-auth/shared-session.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ This method utilizes the session authentication info already stored in your user
19
19
</Warning>
20
20
</Step>
21
21
<Steptitle="Configure your User Auth settings">
22
-
Go to your [Mintlify dashboard settings](https://dashboard.mintlify.com/settings/integrations) and add the API URL and your Login URL to your User Auth settings.
22
+
Go to your [Mintlify dashboard settings](https://dashboard.mintlify.com/mintlify/mintlify/settings/deployment/user-authentication) and add the API URL and your Login URL to your User Auth settings.
0 commit comments