parse-community / Parse-SDK-Flutter

The Dart/Flutter SDK for Parse Platform
https://parseplatform.org
Apache License 2.0
575 stars 188 forks source link

Support context for Parse.User save, signUp and login methods #1009

Open valerycolong opened 1 day ago

valerycolong commented 1 day ago

New Feature / Enhancement Checklist

Current Limitation

Parse Server SDK Javascript offers support for passing context with the save, login (and perhaps signUp) methods. This has permitted my team to easily implement custom OTP signing flows with our web apps. It will be nice if we can do same from our flutter app.

Feature / Enhancement Description

The feature request is simply to allow ParseUser class save, login, and signUp methods to be able to take context object that will be sent to the backend very similar to how the JS SDK does it.

Example Use Case

I want to be able to do the following and have it reflect in the backend for example:

await ParseUser.createUser(
    username, 
    password, 
    email
).login(context: context)

Alternatives / Workarounds

An alternative is to use custom auth provider, however, this approach too comes with a challenge as it does now trigger the afterLogin event after the user successfully logs in.

parse-github-assistant[bot] commented 1 day ago

Thanks for opening this issue!