Comments (12)
Bump :)
from parse-sdk-js.
Hi Alex, Based on the info you provided, its unclear to me whether the user didn't become non-anonymous because the logic prior to the signUp call failed. Do you have some logs demonstrating that signUp was actually executed?
Could you try removing all code except for just set username, set password, and signUp to help narrow down the range of possibilities? If you can repro with this simpler case, please also provide info like SDK version number. Thanks!
from parse-sdk-js.
Thank you for your feedback. We prioritize issues that have clear and concise repro steps. Please see our Bug Reporting Guidelines about what information should be added to this issue.
Please try the latest SDK. Our release notes have details about what issues were fixed in each release.
In addition, you might find the following resources helpful:
- Documentation: https://www.parse.com/docs
- Google Groups: https://groups.google.com/forum/#!forum/parse-developers
- Stack Overflow: http://stackoverflow.com/tags/parse.com
from parse-sdk-js.
Hi Stanleyw, yes the fact that the function succeeded without errors would be logged in the logs at parse. It looks like it doesn't let me go back that far though, I assume you have more powers than me in that department.
Another way I know it succeeds because reset password emails get sent out.
Also, we can tell that nothing before the signup call failed because the username and password were actually set on the user.
from parse-sdk-js.
@alexblack What version of JS SDK did you use?
from parse-sdk-js.
@stanleyw 1.4. I'll retest on Monday with the latest.
from parse-sdk-js.
I dug into this further, here is what I've found:
- Looks like the Parse backend has always left the anonymous authData unchanged when an anonymous user gets upgraded to a normal user via setting username/password. You can reproduce this by calling the Parse REST API directly to save the user. We can't really change this backend behavior because we don't know whether anyone relies on this today.
- The JS SDK currently does not support anonymous user manipulation (i.e. Parse.AnonymousUtils doesn't exist), so there is no JS
unlink
method. However, if you really want to unlink the user from the anonymous authData, you can use the REST API (https://www.parse.com/docs/rest/guide#users-unlinking). The Cloud Code equivalent is:
Parse.Cloud.httpRequest({
method: 'PUT',
url: 'https://api.parse.com/1/users/' + yourUser.id,
body: '{ "authData": { "anonymous": null }}',
headers: {
'Content-Type': 'application/json',
'X-Parse-Application-Id': Parse.applicationId,
'X-Parse-Master-Key': Parse.masterKey
}
}).then(function(httpResponse) {
console.log(httpResponse.text);
}, function(httpResponse) {
console.error('Request failed ' + httpResponse.status + ' ' + httpResponse.text);
});
Let us know whether this workaround works!
from parse-sdk-js.
Hi @stanleyw thanks for looking into it. Is it a bug then?
I will try the work around to try to fix up the signUp call. Its strange that the signUp call in the JS SDK gives different results than the Android SDK.
from parse-sdk-js.
Currently I have this code in my Android app to work around the bug:
final ParseUser user = ParseUser.getCurrentUser();
// hack: if we use the cloud function requestPasswordResetInBackgroundAnonymous to upgrade an anonymous user
// then Parse still thinks its anonymous, so lets check the username and see if its set to an email address (which we would have done)
// see: https://github.com/ParsePlatform/Parse-SDK-JS/issues/13
if (!ParseAnonymousUtils.isLinked(user) || Fmt.isValidEmail(user.getUsername()) ) {
from parse-sdk-js.
This issue has not been updated for 7 days. If you have additional information to help pinpoint this issue as an SDK bug, please comment on this issue. We will close this issue in 7 days if no additional information is provided. Thank you for your feedback.
from parse-sdk-js.
Thanks for the new info, dug into this more and realized that our iOS and Android SDKs strip the authData client-side. See https://github.com/ParsePlatform/Parse-SDK-Android/blob/master/Parse/src/main/java/com/parse/ParseUser.java#L429
We'll look into doing the same for the JS SDK.
from parse-sdk-js.
Great.
from parse-sdk-js.
Related Issues (20)
- API Reference Documentation not updated HOT 1
- SDK throws error in web contexts where calling into `window.indexedDB` is prohibited, but not undefined on the window HOT 2
- Calling `.add` multiple times on relations is broken HOT 4
- Refused to get unsafe header "access-control-expose-headers" on Chrome HOT 17
- Allow for REST Content Override for Server protection HOT 2
- Align currently supported Node.js version HOT 4
- `Parse.User.verifyPassword` does not pass request options to server HOT 5
- Parse SDK 4.3.1 is not working with React Native / Expo HOT 9
- Expo RN and ParseLiveQuery EventEmitter error HOT 13
- Cannot set ACL from JSON HOT 1
- Infinite loop in `encode.js` HOT 5
- Missing test for `Parse.User.verifyPassword` option `ignoreEmailVerification` HOT 2
- `Parse.Object.set` sliently handles validation errors HOT 1
- TypeError: attempted to use private field on non-instance, js engine: hermes HOT 3
- Installation support for JS SDK HOT 4
- Allow to run queries through LiveQueryClient (Parse Server issue #9086) HOT 5
- Local state of objects not correct if setting multiple properties HOT 2
- LocalDatastore tests fail HOT 4
- Parse.Installation doesn't handle deleted Installation objects on server HOT 3
- Replace dependency ip-node HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from parse-sdk-js.