feat(): Add support for jwt asymetric keys (#12813)

* feat(): Add support for jwt asymetric keys

* Create early-chefs-chew.md

* fix unit tests

* Add verify options support

* feedback

* fix unit tests
This commit is contained in:
Adrien de Peretti
2025-06-25 10:29:32 +02:00
committed by GitHub
parent a833c3c98c
commit d517dbd66a
23 changed files with 813 additions and 43 deletions
@@ -9,6 +9,7 @@ import {
WorkflowResponse,
} from "@medusajs/framework/workflows-sdk"
import { emitEventStep, useRemoteQueryStep } from "../../common"
import { ProjectConfigOptions } from "@medusajs/framework/types"
/**
* This workflow generates a reset password token for a user. It's used by the
@@ -45,7 +46,8 @@ export const generateResetPasswordTokenWorkflow = createWorkflow(
entityId: string
actorType: string
provider: string
secret: string
secret: ProjectConfigOptions["http"]["jwtSecret"]
jwtOptions?: ProjectConfigOptions["http"]["jwtOptions"]
}) => {
const providerIdentities = useRemoteQueryStep({
entry_point: "provider_identity",
@@ -79,6 +81,7 @@ export const generateResetPasswordTokenWorkflow = createWorkflow(
{
secret: input.secret,
expiresIn: "15m",
jwtOptions: input.jwtOptions,
}
)