feat: Reset password (#8962)

* wip

* more work

* wip

* more work

* wrap up first iteration

* work on new approach

* more work

* move middleware func to route

* cleanup

* more work

* wrap up

* more work

* fix workflow

* minor tweaks

* finalize

* Use JWT secret instead
This commit is contained in:
Oli Juhl
2024-09-06 12:28:29 +02:00
committed by GitHub
parent 2c5e72d141
commit e27056b3c3
29 changed files with 633 additions and 194 deletions
@@ -2,7 +2,7 @@ import {
AuthenticationInput,
AuthenticationResponse,
AuthIdentityProviderService,
IAuthProvider,
IAuthProvider
} from "@medusajs/types"
/**
@@ -238,6 +238,15 @@ export abstract class AbstractAuthModuleProvider implements IAuthProvider {
)
}
update(
data: Record<string, unknown>,
authIdentityProviderService: AuthIdentityProviderService
): Promise<AuthenticationResponse> {
throw new Error(
`Method 'update' not implemented for provider ${this.provider}`
)
}
/**
* This method validates the callback of an authentication request.
*
@@ -10,6 +10,16 @@ export const OrderWorkflowEvents = {
COMPLETED: "order.completed",
}
export const UserWorkflowEvents = {
CREATED: "user.created",
UPDATED: "user.updated",
DELETED: "user.deleted",
}
export const AuthWorkflowEvents = {
PASSWORD_RESET: "auth.password_reset",
}
export const SalesChannelWorkflowEvents = {
CREATED: "sales-channel.created",
UPDATED: "sales-channel.updated",
-6
View File
@@ -7,9 +7,3 @@ export const UserEvents = {
...buildEventNamesFromEntityName(eventBaseNames, Modules.USER),
INVITE_TOKEN_GENERATED: `${Modules.USER}.user.invite.token_generated`,
}
export const UserWorkflowEvents = {
CREATED: "user.created",
UPDATED: "user.updated",
DELETED: "user.deleted",
}