Feat(auth): Remove auth provider entity (#6314)
**What** - remove auth provider entity **Why** - The auth provider entity was not really used anywhere **How** - Keeping loader behavior as is but removing the Co-authored-by: Sebastian Rindom <7554214+srindom@users.noreply.github.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { StepResponse, createStep } from "@medusajs/workflows-sdk"
|
||||
|
||||
import { IAuthModuleService } from "@medusajs/types"
|
||||
import { ModuleRegistrationName } from "@medusajs/modules-sdk"
|
||||
import { isDefined } from "@medusajs/utils"
|
||||
@@ -17,7 +18,7 @@ export const setAuthAppMetadataStep = createStep(
|
||||
ModuleRegistrationName.AUTH
|
||||
)
|
||||
|
||||
const authUser = await service.retrieveAuthUser(data.authUserId)
|
||||
const authUser = await service.retrieve(data.authUserId)
|
||||
|
||||
const appMetadata = authUser.app_metadata || {}
|
||||
if (isDefined(appMetadata[data.key])) {
|
||||
@@ -26,7 +27,7 @@ export const setAuthAppMetadataStep = createStep(
|
||||
|
||||
appMetadata[data.key] = data.value
|
||||
|
||||
await service.updateAuthUser({
|
||||
await service.update({
|
||||
id: authUser.id,
|
||||
app_metadata: appMetadata,
|
||||
})
|
||||
@@ -44,14 +45,14 @@ export const setAuthAppMetadataStep = createStep(
|
||||
ModuleRegistrationName.AUTH
|
||||
)
|
||||
|
||||
const authUser = await service.retrieveAuthUser(id)
|
||||
const authUser = await service.retrieve(id)
|
||||
|
||||
const appMetadata = authUser.app_metadata || {}
|
||||
if (isDefined(appMetadata[key])) {
|
||||
delete appMetadata[key]
|
||||
}
|
||||
|
||||
await service.updateAuthUser({
|
||||
await service.update({
|
||||
id: authUser.id,
|
||||
app_metadata: appMetadata,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user