parse-server icon indicating copy to clipboard operation
parse-server copied to clipboard

feat: add Huawei auth adapter

Open rltjqdl1138 opened this issue 4 years ago • 5 comments

Add huawei auth adapter I refer to google auth adapter More information about huawei oauth: Huawei developer

New Pull Request Checklist

  • [x] I am not disclosing a vulnerability.
  • [x] I am creating this PR in reference to an issue.

Issue Description

Related issue: FILL_THIS_OUT

Approach

TODOs before merging

  • [ ] Add tests
  • [x] Add changes to documentation (guides, repository pages, in-code descriptions)
  • [x] Add security check
  • [ ] Add new Parse Error codes to Parse JS SDK
  • [x] A changelog entry is created automatically using the pull request title (do not manually add a changelog entry)

rltjqdl1138 avatar Nov 26 '21 07:11 rltjqdl1138

Thanks for opening this pull request!

  • ❌ Please edit your post and use the provided template when creating a new pull request. This helps everyone to understand your post better and asks for essential information to quicker review the pull request.

Codecov Report

Merging #7721 (6ccb356) into alpha (0c3feaa) will decrease coverage by 0.15%. The diff coverage is 19.35%.

Impacted file tree graph

@@            Coverage Diff             @@
##            alpha    #7721      +/-   ##
==========================================
- Coverage   93.95%   93.79%   -0.16%     
==========================================
  Files         183      184       +1     
  Lines       13660    13691      +31     
==========================================
+ Hits        12834    12842       +8     
- Misses        826      849      +23     
Impacted Files Coverage Δ
src/Adapters/Auth/huawei.js 16.66% <16.66%> (ø)
src/Adapters/Auth/index.js 93.65% <100.00%> (+0.10%) :arrow_up:
src/Adapters/Files/GridFSBucketAdapter.js 80.32% <0.00%> (+0.81%) :arrow_up:
src/ParseServerRESTController.js 98.50% <0.00%> (+1.49%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 410a1c7...6ccb356. Read the comment docs.

codecov[bot] avatar Nov 26 '21 10:11 codecov[bot]

Do we need any tests here? Do other auth adapters have specific tests?

mtrezza avatar Dec 02 '21 17:12 mtrezza

Do we need any tests here? Do other auth adapters have specific tests?

I only use Facebook and Huawei now. These two adapters are working well in common case.

  • success
  • expired token
  • wrong token
  • id is not matched

And my service uses very limited APIs

  • Login
  • Signup
  • Link to other users

I only tested upper cases. If there isn't features to use auth adapter, I think it works well

rltjqdl1138 avatar Dec 03 '21 05:12 rltjqdl1138

I mean whether there are existing automated tests for other auth adapters, that we also need to add for this new Huawei adapter? See the /spec folder.

mtrezza avatar Dec 05 '21 12:12 mtrezza