parse-server
parse-server copied to clipboard
feat: new auth adapter (continuation)
New Pull Request Checklist
- [x] I am not disclosing a vulnerability.
- [x] I am creating this PR in reference to an issue.
Issue Description
Continues on from #7079.
Related issue: #7079
Approach
- Adds ability to throw errors from
- cleans up code
- removes parameter
options
as it can be accessed on the adapter viathis
TODOs before merging
- [x] Add tests
- [x] A changelog entry is created automatically using the pull request title (do not manually add a changelog entry)
Thanks for opening this pull request!
- 🎉 We are excited about your hands-on contribution!
Codecov Report
Base: 94.13% // Head: 84.68% // Decreases project coverage by -9.45%
:warning:
Coverage data is based on head (
838cf17
) compared to base (ed3248f
). Patch coverage: 98.57% of modified lines in pull request are covered.
Additional details and impacted files
@@ Coverage Diff @@
## alpha #8156 +/- ##
==========================================
- Coverage 94.13% 84.68% -9.46%
==========================================
Files 182 182
Lines 13785 13973 +188
==========================================
- Hits 12977 11833 -1144
- Misses 808 2140 +1332
Impacted Files | Coverage Δ | |
---|---|---|
...dapters/Storage/Postgres/PostgresStorageAdapter.js | 2.47% <0.00%> (-93.24%) |
:arrow_down: |
src/Deprecator/Deprecations.js | 100.00% <ø> (ø) |
|
src/GraphQL/loaders/parseClassTypes.js | 94.87% <ø> (ø) |
|
src/Options/Definitions.js | 100.00% <ø> (ø) |
|
src/Options/index.js | 100.00% <ø> (ø) |
|
src/cloud-code/Parse.Cloud.js | 99.20% <ø> (ø) |
|
src/Routers/UsersRouter.js | 95.02% <98.43%> (+0.63%) |
:arrow_up: |
src/Adapters/Auth/index.js | 98.79% <100.00%> (+5.24%) |
:arrow_up: |
src/Auth.js | 99.56% <100.00%> (+0.26%) |
:arrow_up: |
src/Config.js | 89.05% <100.00%> (+0.12%) |
:arrow_up: |
... and 22 more |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
@Moumouls Do you want to review this PR before merging?
Yes @mtrezza , I'll check the diff between this one and my original PR
Quite busy currently @mtrezza, @dblythy but i don't forget this one 👍 I will also build a custom version and test it on my company repo to check that everything works with advanced usage
@Moumouls Did you get to try this out?
A gentle reminder to @Moumouls and @rhuanbarreto that this PR is ready for review. I remember you both have been very outspoken in https://github.com/parse-community/parse-server/pull/7079 about the urgency of getting this feature merged. It's now waiting for >1 month for feedback on the new changes, so if you could take a look and post some feedback that would be great, so we can finally get this merged. Thanks.
So @mtrezza if the options and the functional approach are restored we should be okay (plus the new test). I did not find other issues running this branch on my company project. We are close. Thanks, @dblythy for the continuation.
Let's try to merge this PR by end of next week. There are some other changes that are blocked by this PR, so it would be great if we could accomplish that.
@dblythy @mtrezza I'll take a look into this today, we are so close :rocket:
Thanks @dblythy for you contributions !
I will reformat the title to use the proper commit message syntax.
Do / should we have any docs that come with this PR?
To confirm again, this PR doesn't include any breaking changes? If it does, that's also fine since we can release it with Parse Server 6, but we would need to document them.
@mtrezza I forgot your comment
To confirm again, this PR doesn't include any breaking changes?
No breaking changes here, Parse is still fully compatible with current and older auth systems. Basically it's just a new auth interface for backend adapters.
BTW, we can consider to release it into Parse V6 as a new major feature, since with this system it will be really easy to develop Webauthn, OTP, TOTP, MFA, and any advanced auth mechanism !
It's quite a significant change so I would also say to release it with PS6, not as a feature in PS5. In case there are any issues, people can stay on PS5 and we can still maintain the LTS branch separately.
In that sense we got this ready for merge just in time 😉
@mtrezza i can suggest "feat: enhanced auth adapter interface"
Btw, let's merge this one !
Could we find a more descriptive changelog entry? A title that gives a better idea about the new capabilities, so developers can better understand what benefit this change has, and they start exploring the feature, for example MFA. 4 words seems a pretty modest description for a feature that required so much work 😉
How about:
feat: Improve authentication adapter interface to support multi-factor authentication (MFA), authentication challenges, and provide a more powerful interface for writing custom authentication adapters.
you description is nice @mtrezza let's go for it 🚀
Great, we have a few other PRs to merge before this; I estimate we'll merge this on Monday.
🎉 This change has been released in version 6.0.0-alpha.2
It's merged! Thanks @Moumouls for starting this and @dblythy for finishing this, and everyone else between.
Awesome work @Moumouls - keen to see the cool new auth adapters that are made thanks to your work! Would be good to try ship some of these new ones as part of Parse Server 6
🎉 This change has been released in version 6.0.0-beta.1
🎉 This change has been released in version 6.0.0