UNPKG

@lucidcms/core

Version:

The core of the Lucid CMS. It's responsible for spinning up the API and serving the CMS.

1 lines 1.06 kB
{"version":3,"file":"revoke-all-refresh-tokens.mjs","names":["authServices.refreshToken.revokeUserTokens","constants"],"sources":["../../../src/services/account/revoke-all-refresh-tokens.ts"],"sourcesContent":["import constants from \"../../constants/constants.js\";\nimport type { ServiceFn } from \"../../utils/services/types.js\";\nimport { authServices } from \"../index.js\";\n\nconst revokeAllRefreshTokens: ServiceFn<\n\t[\n\t\t{\n\t\t\tuserId: number;\n\t\t},\n\t],\n\tundefined\n> = async (context, data) => {\n\tconst revokeRes = await authServices.refreshToken.revokeUserTokens(context, {\n\t\tuserId: data.userId,\n\t\trevokeReason: constants.refreshTokenRevokeReasons.accountRevokeAll,\n\t});\n\tif (revokeRes.error) return revokeRes;\n\n\treturn {\n\t\terror: undefined,\n\t\tdata: undefined,\n\t};\n};\n\nexport default revokeAllRefreshTokens;\n"],"mappings":"yGAIA,MAAM,EAOF,MAAO,EAAS,IAAS,CAC5B,IAAM,EAAY,MAAMA,EAA2C,EAAS,CAC3E,OAAQ,EAAK,OACb,aAAcC,EAAU,0BAA0B,gBACnD,CAAC,EAGD,OAFI,EAAU,MAAc,EAErB,CACN,MAAO,IAAA,GACP,KAAM,IAAA,EACP,CACD"}