Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
3 tasks done
valerycolong opened this issue Aug 14, 2023 · 2 comments · Fixed by #2010
Closed
3 tasks done

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

valerycolong opened this issue Aug 14, 2023 · 2 comments · Fixed by #2010
Labels
type:feature New feature or improvement of existing feature

Comments

@valerycolong
Copy link

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

@parse-github-assistant
Copy link

parse-github-assistant bot commented Aug 14, 2023

Thanks for opening this issue!

  • 🎉 We are excited about your ideas for improvement!

@mtrezza mtrezza added the type:feature New feature or improvement of existing feature label Aug 15, 2023
@mtrezza mtrezza changed the title Allow context in Parse.Cloud.beforeLogin and Parse.Cloud.afterLogin Allow context in Parse.Cloud.beforeLogin and Parse.Cloud.afterLogin Aug 15, 2023
@mtrezza mtrezza changed the title Allow context in Parse.Cloud.beforeLogin and Parse.Cloud.afterLogin Add context container in Parse.Cloud.beforeLogin and Parse.Cloud.afterLogin Aug 15, 2023
@dplewis
Copy link
Member

dplewis commented Aug 25, 2023

I believe this needs to be added to the server first before the SDK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature New feature or improvement of existing feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants