feat: Add context to Cloud Code Triggers beforeLogin and afterLogin (#8724)
This commit is contained in:
@@ -259,7 +259,8 @@ export class UsersRouter extends ClassesRouter {
|
||||
req.auth,
|
||||
Parse.User.fromJSON(Object.assign({ className: '_User' }, user)),
|
||||
null,
|
||||
req.config
|
||||
req.config,
|
||||
req.info.context
|
||||
);
|
||||
|
||||
// If we have some new validated authData update directly
|
||||
@@ -291,7 +292,8 @@ export class UsersRouter extends ClassesRouter {
|
||||
{ ...req.auth, user: afterLoginUser },
|
||||
afterLoginUser,
|
||||
null,
|
||||
req.config
|
||||
req.config,
|
||||
req.info.context
|
||||
);
|
||||
|
||||
if (authDataResponse) {
|
||||
|
||||
@@ -270,6 +270,8 @@ export function getRequestObject(
|
||||
triggerType === Types.afterSave ||
|
||||
triggerType === Types.beforeDelete ||
|
||||
triggerType === Types.afterDelete ||
|
||||
triggerType === Types.beforeLogin ||
|
||||
triggerType === Types.afterLogin ||
|
||||
triggerType === Types.afterFind
|
||||
) {
|
||||
// Set a copy of the context on the request object.
|
||||
|
||||
Reference in New Issue
Block a user