MCPcopy Index your code
hub / github.com/parse-community/parse-server / handleLogOut

Method handleLogOut

src/Routers/UsersRouter.js:493–523  ·  view source on GitHub ↗
(req)

Source from the content-addressed store, hash-verified

491 }
492
493 async handleLogOut(req) {
494 const success = { response: {} };
495 if (req.info && req.info.sessionToken) {
496 const records = await rest.find(
497 req.config,
498 Auth.master(req.config),
499 '_Session',
500 { sessionToken: req.info.sessionToken },
501 undefined,
502 req.info.clientSDK,
503 req.info.context
504 );
505 if (records.results && records.results.length) {
506 await rest.del(
507 req.config,
508 Auth.master(req.config),
509 '_Session',
510 records.results[0].objectId,
511 req.info.context
512 );
513 await maybeRunTrigger(
514 TriggerTypes.afterLogout,
515 req.auth,
516 Parse.Session.fromJSON(Object.assign({ className: '_Session' }, records.results[0])),
517 null,
518 req.config
519 );
520 }
521 }
522 return success;
523 }
524
525 _throwOnBadEmailConfig(req) {
526 try {

Callers 2

mountRoutesMethod · 0.95
loadFunction · 0.80

Calls 3

maybeRunTriggerFunction · 0.90
findMethod · 0.65
delMethod · 0.45

Tested by

no test coverage detected