File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed 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
1515 Create a login flow that does the following:
1616 - Authenticate the user
1717 - Create a JWT containing the authenticated user's info in the [ UserInfo] ( ./sending-data ) format
18- - Sign the JWT with the secret, using the ES256 algorithm
18+ - Sign the JWT with the secret, using the EdDSA algorithm
1919 - Create a redirect URL back to your docs, including the JWT as the hash
2020 </Step >
2121 <Step title = " Configure your User Auth settings" >
@@ -46,7 +46,7 @@ import { Request, Response } from 'express';
4646
4747const TWO_WEEKS_IN_MS = 1000 * 60 * 60 * 24 * 7 * 2 ;
4848
49- const signingKey = await jose .importPKCS8 (process .env .MINTLIFY_PRIVATE_KEY , ' ES256 ' );
49+ const signingKey = await jose .importPKCS8 (process .env .MINTLIFY_PRIVATE_KEY , ' EdDSA ' );
5050
5151export async function handleRequest(req : Request , res : Response ) {
5252 const userInfo = {
@@ -59,7 +59,7 @@ export async function handleRequest(req: Request, res: Response) {
5959 };
6060
6161 const jwt = await new jose .SignJWT (userInfo )
62- .setProtectedHeader ({ alg: ' ES256 ' })
62+ .setProtectedHeader ({ alg: ' EdDSA ' })
6363 .setExpirationTime (' 10 s' )
6464 .sign (signingKey );
6565
You can’t perform that action at this time.
0 commit comments