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
+41-4Lines changed: 41 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ If you don’t have a dashboard, or if you want to keep your dashboard and docs
15
15
Create a login flow that does the following:
16
16
- Authenticate the user
17
17
- Create a JWT containing the authenticated user's info in the [UserInfo](./sending-data) format
18
-
- Sign the JWT with the secret
18
+
- Sign the JWT with the secret, using the ES256 algorithm
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">
@@ -25,11 +25,48 @@ If you don’t have a dashboard, or if you want to keep your dashboard and docs
25
25
26
26
## Example
27
27
28
-
I want to set up authentication for my docs hosted at `docs.foo.com`. I want my docs to be completely separate from my dashboard (or I don’t have a dashboard at all).
28
+
I want to set up authentication for my docs hosted at `docs.foo.com`. I want my docs
29
+
to be completely separate from my dashboard (or I don’t have a dashboard at all).
29
30
30
-
To set up authentication with Mintlify, I go to my Mintlify dashboard and generate a JWT secret. I create a web URL `https://foo.com/docs-login` that initiates a login flow for my users. At the end of this login flow, once I have verified the identity of the user, I create a JWT containing the user’s custom data according to Mintlify’s specification. I sign this JWT with my Mintlify secret, create a redirect URL of the form `https://docs.foo.com#{SIGNED_JWT}`, and redirect the user.
31
+
To set up authentication with Mintlify, I go to my Mintlify dashboard and generate a
32
+
JWT secret. I create a web URL `https://foo.com/docs-login` that initiates a login flow
33
+
for my users. At the end of this login flow, once I have verified the identity of the user,
34
+
I create a JWT containing the user’s custom data according to Mintlify’s specification.
35
+
I use a JWT library to sign this JWT with my Mintlify secret, create a redirect URL of the
36
+
form `https://docs.foo.com#{SIGNED_JWT}`, and redirect the user.
31
37
32
-
I then go to the Mintlify dashboard settings and enter `https://foo.com/docs-login` for the Login URL field.
38
+
I then go to the Mintlify dashboard settings and enter `https://foo.com/docs-login` for the
0 commit comments