Skip to content

Add context container in Parse.Cloud.beforeLogin and Parse.Cloud.afterLogin #1991

Closed
@valerycolong

Description

@valerycolong

New Feature / Enhancement Checklist

Current Limitation

It is currently not possible to access context data in Parse.Cloud.beforeLogin and Parse.Cloud.afterLogin hook triggers.

Feature / Enhancement Description

Similar to Parse.Cloud.beforeSave and Parse.Cloud.afterSave triggers, where it is possible to get context data feom the context object via the request parameter of the trigger callback.

Example Use Case

  1. This could help facilitate MFA authentication such as in cases when an email verification needs to be passed alongside parse email auth data before login is permitted.
  2. It may also come in handy in context switching during or after login such as in case of performing certain actions based on context data after login.

Alternatives / Workarounds

In my project, I was forced to use Redis cache and making additional request to the server which wasn't really necessary.
Also, lack of this feature resulted in extra code.

3rd Party References

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:featureNew feature or improvement of existing feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions