parse-community / parse-community/parse-server
BeforeLogin could provide the auth used to login
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 21.4k
- Forks
- 4.8k
- Avg merge
- 7h 45m
- Merged PRs (30d)
- 11
Description
Is your feature request related to a problem? Please describe.
We let users create their account through various providers (email, facebook, google, etc.) and sometimes they forget which they used.
So when they try to login in the app after a while, they can try with an email/password and we would like to tell them they should use Facebook instead.
Describe the solution you'd like
The beforeLogin could be called even if a login failed, and we could have a status:failed and the authData provided by the client to login (for example the email), so that we could check if that user is a facebook user instead and return a specific error.
With the actual implementation, we can't do that, and the login will just failed without triggering the beforeLogin, and the user won't be able to know if he used a wrong password or a wrong provider.
Describe alternatives you've considered
The only way to do it for now, is to try to login, catch the error on client side, request a cloudfunction to check the user authentication method, and display the correct error message
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The requested entry point is the beforeLogin hook in the login flow; start by tracing how failed authentication is handled. Done means failed logins can provide the client auth data and a failed status to beforeLogin, enabling provider-specific errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- authentication
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100