Skip to content

Commit 7724d2c

Browse files
EdDSA -> ES256 (#590)
1 parent fdd7ce9 commit 7724d2c

File tree

1 file changed

+3
-3
lines changed
  • settings/authentication-personalization/personalization-setup

1 file changed

+3
-3
lines changed

settings/authentication-personalization/personalization-setup/jwt.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ If you don’t have a dashboard, or if you want to keep your dashboard and docs
2020
Create a login flow that does the following:
2121
- Authenticate the user
2222
- Create a JWT containing the authenticated user's info in the [User](../sending-data) format
23-
- Sign the JWT with the secret key, using the EdDSA algorithm
23+
- Sign the JWT with the secret key, using the ES256 algorithm
2424
- Create a redirect URL back to your docs, including the JWT as the hash
2525
</Step>
2626
<Step title="Configure your Personalization settings">
@@ -51,7 +51,7 @@ import { Request, Response } from 'express';
5151

5252
const TWO_WEEKS_IN_MS = 1000 * 60 * 60 * 24 * 7 * 2;
5353

54-
const signingKey = await jose.importPKCS8(process.env.MINTLIFY_PRIVATE_KEY, 'EdDSA');
54+
const signingKey = await jose.importPKCS8(process.env.MINTLIFY_PRIVATE_KEY, 'ES256');
5555

5656
export async function handleRequest(req: Request, res: Response) {
5757
const user = {
@@ -64,7 +64,7 @@ export async function handleRequest(req: Request, res: Response) {
6464
};
6565

6666
const jwt = await new jose.SignJWT(user)
67-
.setProtectedHeader({ alg: 'EdDSA' })
67+
.setProtectedHeader({ alg: 'ES256' })
6868
.setExpirationTime('10 s')
6969
.sign(signingKey);
7070

0 commit comments

Comments
 (0)