Skip to content
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

Add options to _linkWith(provider) for masterKey #767

Merged
merged 7 commits into from
Mar 29, 2019

Conversation

acinader
Copy link
Contributor

  1. without the master key it is not possible to link a user with an auth provider in cloud code
  2. remove a recent addition to pass the sessionToken which was added for anonymous auth, but not necessary and causing problems. Also remove the related test.

Remove test that verifies that session token is added to save options
2. add a fixme to add options to unlink too
@acinader acinader requested a review from dplewis March 29, 2019 04:35
@acinader
Copy link
Contributor Author

@dplewis parse-server unit tests, my cloud code unit tests and the specific issue I was having (linking a user to a custom OAuth provider in cloud) all work with these changes, but I want to cover and provide passing tests with the master key and test that throw when there is no master key, but I am having trouble getting it to work. gonna sleep on it. If you see anything obvious or have any guidance, I'm all ears :).

@dplewis dplewis marked this pull request as ready for review March 29, 2019 13:29
@dplewis
Copy link
Member

dplewis commented Mar 29, 2019

@acinader Thanks for getting this started. I fixed the tests.

On the client side - you can link with current user / sessionToken
On server side - since current user doesn't exist you have to use master key / sessionToken

I realized the docs needs to be updated for this. Unlinking

@codecov
Copy link

codecov bot commented Mar 29, 2019

Codecov Report

Merging #767 into master will increase coverage by 0.2%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #767     +/-   ##
=========================================
+ Coverage   90.37%   90.57%   +0.2%     
=========================================
  Files          54       54             
  Lines        4905     4903      -2     
  Branches     1089     1088      -1     
=========================================
+ Hits         4433     4441      +8     
+ Misses        472      462     -10
Impacted Files Coverage Δ
src/ParseObject.js 90.02% <ø> (+0.09%) ⬆️
src/ParseUser.js 82.25% <100%> (+2.15%) ⬆️

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 b5e51d3...155310d. Read the comment docs.

@dplewis dplewis merged commit 781026c into parse-community:master Mar 29, 2019
dplewis added a commit that referenced this pull request Mar 29, 2019
dplewis added a commit that referenced this pull request Mar 29, 2019
* ⚡️ Release v2.3.1

Bump dev-dependencies

* remove vendor folder

* revert dev-dep

* fix flaky tests

* add #767 to changelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants