profile
viewpoint
Mengyan Wang wangmengyan95 Facebook United States

wangmengyan95/JavaDataStructure 2

some basic data structure implemented by java

ulyanas/arch 0

Architectures

wangmengyan95/ConcurrencyEchoServer 0

Simple application to learn go language

wangmengyan95/CourseraMachineLearning 0

Exercise for coursera Andrew NG ML

wangmengyan95/GRUBLR 0

Source code of website GRUBLR

wangmengyan95/Iphone 0

Simple app to learn objective-c

wangmengyan95/KNOT 0

Source code of website KNOT

PR opened parse-community/docs

Update deploying-heroku-mlab.md

updating mLab->Atlas info

+4 -4

0 comment

1 changed file

pr created time in 3 hours

pull request commentparse-community/parse-server

Update pg-promise to fix ssl issue

@davimacedo I did npm install to update the package.json, should I have done something else, seems like a lot of changes in the file for what I did.

cbaker6

comment created time in 4 hours

pull request commentparse-community/parse-server

Update pg-promise to fix ssl issue

<!-- 0 failure: 0 warning:

1 markdown notices DangerID: danger-id-Peril; -->

Danger run resulted in 1 warning; to find out more, see the checks page. <p align="right"> Generated by :no_entry_sign: <a href="https://danger.systems/js">dangerJS</a> </p>

cbaker6

comment created time in 4 hours

Pull request review commentparse-community/docs

Update users.md

 mutation resetPassword { } ``` +The emailed password reset link will GET the Parse REST API to verify the token is still valid.  For example:+```+https://www.example.com/parse/apps/APP_ID/request_password_reset?token=xxxxxxxxxxxx&username=test%40example.com+```

Ok. Makes sense. I hadn't fully understood the example.

MichaelJCole

comment created time in 4 hours

pull request commentparse-community/parse-server

[Snyk] Upgrade pg-promise from 10.7.1 to 10.7.3

Good. Do you mind to open a PR with the update?

snyk-bot

comment created time in 4 hours

push eventparse-community/parse-server

Antonio Davi Macedo Coelho de Castro

commit sha da905a357d062ab4fea727a21eac231acc2ed92a

Merge pull request from GHSA-4w46-w44m-3jq3 * strip password after authentication to prevent cleartext password storage * fixed forgotten testcase forcing ;-/ * added test to check if password is not stored in user record Co-authored-by: Fabian Strachanski <fabian@fastr.de>

view details

push time in 4 hours

issue commentparse-community/parse-server

Error 206 cannot modify user for new Facebook user

could you please try to pass down the loggedInUser var and save it instead of PFUser.current()? I'm wondering that at that point the PFUser.current() was not yet updated by the PFFacebookUtils. Anyways I believe this is an issue with the iOS SDK and not Parse Server.

ashish-naik

comment created time in 4 hours

Pull request review commentparse-community/docs

Update users.md

 mutation resetPassword { } ``` +The emailed password reset link will GET the Parse REST API to verify the token is still valid.  For example:+```+https://www.example.com/parse/apps/APP_ID/request_password_reset?token=xxxxxxxxxxxx&username=test%40example.com+```

Hi @daviddoran the "example.com" in that URL comes from the user's email when they register for an account.

MichaelJCole

comment created time in 4 hours

issue commentparse-community/parse-server

Parse Server performance loss

directAccess should help on that but since it is still an experimental feature, could you repeat the test with original code and directAccess set false? It should basically do same thing you did in the second test.

uzaysan

comment created time in 4 hours

Pull request review commentparse-community/docs

Update users.md

 mutation resetPassword { } ``` +The emailed password reset link will GET the Parse REST API to verify the token is still valid.  For example:+```+https://www.example.com/parse/apps/APP_ID/request_password_reset?token=xxxxxxxxxxxx&username=test%40example.com+```

Thanks for the PR! Maybe also explain how to set www.example.com in Parse Server?

MichaelJCole

comment created time in 4 hours

pull request commentparse-community/docs

Delete compatibility.md

Just found a link on the menu. Also looked for external references on google and did not found

alyssoncm

comment created time in 5 hours

PR opened parse-community/docs

Update users.md

Hi, this is based on my experience attempting to use the Parse GraphQL API with a custom Quasar front-end from this guide. I'm using the "customPages" feature which may be different from other users. Parse seems to be a great back-end data provider, and I'm excited to start building features with it!

See also: https://github.com/parse-community/parse-server/issues/7033 and https://github.com/parse-community/parse-server/issues/7028

The REST Guide might benefit from the same documentation. I'm very new to Parse, so edits welcome. Thank you

+88 -2

0 comment

1 changed file

pr created time in 6 hours

issue commentparse-community/parse-server

Error 206 cannot modify user for new Facebook user

I haven't tested this but removed all non-essential part.

import Parse

func loginWithFacebook() {
	
	PFFacebookUtils.logInInBackground(withReadPermissions: facebookPermissions) {
		(loggedInUser: PFUser?, error: Error?) in
		
		if error == nil && loggedInUser != nil {
			
			saveUserDetailsOnParse(isNewUser: loggedInUser!.isNew, user: loggedInUser! ,socialId: socialId, email: userEmail, name: userName, profileImageURL: profileImageURL, loginProvider: "facebook", callback: { (message, error) in
				
				if error == nil {
					//proceed to home screen
				} else {
					//show error
				}
			})
		}
	}
}



func saveUserDetailsOnParse(isNewUser: Bool, user: PFUser?, socialId: String, email: String, name: String,  loginProvider: String, callback: @escaping (String, NSError?) -> ())  {
	
	if name != "" && PFUser.current()?["name"] == nil {
		
		PFUser.current()?["name"] = name
	}
	PFUser.current()?["email"] = email
	
	if isNewUser {
		//if logged in user isNew  property is true
		self.saveNewUserToParse() { (errorMessage, error) in
			
			callback(errorMessage, error)
		}
		
	} else {
		//save details for existing user
		PFUser.current()?.saveInBackground(block: { (successSaveUser, error) in
			if successSaveUser {
				logger.debug("User attributes updated to Parse")
				callback("User attributes updated to Parse", nil)
				
			} else {
				
				logger.debug("Error saving current PFUser post login to parse")
				callback("Error saving current PFUser post login to parse", error! as NSError)
				
			}
		})
	}
	
}

func saveNewUserToParse(callback: @escaping (String, NSError?) -> ())  {
	
	//Set some initial values in PFUser.current()
	
	PFUser.current()?.saveInBackground(block: { (successSaveUser, error) in
		
		//MARK: Getting error 206 here
		if successSaveUser {
			callback("New user's attributes saved to Parse", nil)
		} else {
			
			logger.debug("Error saving current PFUser post login/signup to parse  \(error!.localizedDescription)")
			callback("Error saving current PFUser post login/signup to parse", error! as NSError)
		}
	})
	
}
ashish-naik

comment created time in 7 hours

issue commentparse-community/parse-server

Parse Server performance loss

@mtrezza Of course

var api = new ParseServer({
  allowClientClassCreation:false,
  databaseURI: databaseUri || 'mongodb://localhost:27017/dev',
  cloud: process.env.CLOUD_CODE_MAIN || __dirname + '/cloud/main.js',
  appId: process.env.APP_ID || 'appId',
  masterKey: process.env.MASTER_KEY || 'masterKey', //Add your master key here. Keep it secret!
  maxUploadSize: "10mb",
  databaseOptions: { poolSize: 100 },
  directAccess: true,
  enableAnonymousUsers: false,
  enableSingleSchemaCache: true,
  serverURL: process.env.SERVER_URL || 'http://my_ip:1337/parse',
  appName: 'App Name',
  filesAdapter: s3Adapter,
  emailAdapter: emailAdapter,
  publicServerURL: 'https://example.com/parse'
});
uzaysan

comment created time in 7 hours

issue commentparse-community/parse-server

Error 206 cannot modify user for new Facebook user

Can you please reduce the iOS code to a minimum example by removing all code that is not necessary to reproduce the issue?

ashish-naik

comment created time in 7 hours

issue commentparse-community/parse-server

FR: Record slow cloud functions / triggers and cloud function timeout

Any code changes that are not directly related to this feature should be done in a separate PR. Also, I think we are still at the stage of a conceptual discussion.

dblythy

comment created time in 7 hours

pull request commentparse-community/parse-server

GitHub actions

@davimacedo Can you also add a release workflow?

davimacedo

comment created time in 7 hours

issue commentparse-community/parse-server

Parse Server performance loss

Very interesting indeed. Can you share your Parse Server configuration?

uzaysan

comment created time in 7 hours

issue commentparse-community/parse-server

FR: Record slow cloud functions / triggers and cloud function timeout

@mtrezza is it okay to overhaul some of the promise callbacks and move towards await / async? It will be easier for me to add the functionality.

dblythy

comment created time in 7 hours

issue commentparse-community/parse-server

GraphQL: Reset user password with emailed token

Hi @Moumouls, thanks for the invite, I appreciate what you guys have done.

My concerns with making a PR are:

  1. I just started using GraphQL and Parse a couple weeks ago
  2. Auth code needs to be tested, and I'm not familiar with the dev and test environments
  3. I'm on a small project and need to get some features done ASAP

I got this to work using the existing API's, so I'll spend some time to make a documentation PR for the GraphQL and REST guides.

For reference, here is how to complete the password reset with the REST api:

    await axiosClient.post(
      `/parse/apps/${process.env.PARSE_SERVER_APPLICATION_ID}/request_password_reset`,
      `username=${encodeURIComponent(email)}&new_password=${encodeURIComponent(password)}&token=${encodeURIComponent(token)}`,
      {
        headers: {
          'X-Requested-With': 'XMLHttpRequest',
          'content-type': 'application/x-www-form-urlencoded',
        }
      }
    )
MichaelJCole

comment created time in 7 hours

issue commentparse-community/parse-server

Parse Server performance loss

Hey @mtrezza Thank you for taking time on this. I can do what you said. But I want to say a thing. I was doing tests. I changed my code.

Previously my cloud code was like this:

Parse.Cloud.define("code", async (request) => {

  const Block = Parse.Object.extend("Follow");
  
  const getBlock = new Parse.Query(Block);
  return await getBlock.find({useMasterKey:true});

});

And I changed it to this:

Parse.Cloud.define("code", async (request) => {
  return await Parse.Cloud.httpRequest({
    url: `http://127.0.0.1:1337/parse/classes/Follow`,
    method: 'GET',
    headers: {
        'X-Parse-Application-Id': "myAppId"
    }
  });
});

Both cloud code returns same thing(well, second cloud code returns status code and http headers etc as extra. but also returns query result so basicly same thing).

But second code Doesnt decrease perormance. It was stable. In fact I get 30% performance increase with second code. requests per seconds Cloud code one: 70 - 60 - 45 ... But second code: 90 - 103 - 108 - 98 - 103 ...

So With this way performace doesnt decrease. What do you think about this?

uzaysan

comment created time in 7 hours

issue commentparse-community/parse-server

FR: Record slow cloud functions / triggers and cloud function timeout

I planned on extending it to all features mentioned, I just didn't want to jump the gun and build / conceptualise it if it wasn't in line with this projects' goals. Thanks for the feedback!

dblythy

comment created time in 7 hours

issue commentparse-community/parse-server

Error 206 cannot modify user for new Facebook user

sorry forgot that method where error occurs actually.

func saveNewUserToParse(socialId: String?, loginProvider: String?, callback: @escaping (String, NSError?) -> ())  {
                            
        // Setup some seed values for the newly created user
 
        PFUser.current()?.saveInBackground(block: { (successSaveUser, error) in

                //MARK: Getting error 206 here
           if successSaveUser {
                callback("New user's attributes saved to Parse", nil)
            } else {
              
                    logger.debug("Error saving current PFUser post login/signup to parse  \(error!.localizedDescription)")
                    callback("Error saving current PFUser post login/signup to parse", error! as NSError)
            }
        })
        
    }
ashish-naik

comment created time in 8 hours

issue commentparse-community/parse-server

FR: Record slow cloud functions / triggers and cloud function timeout

functions that take a long time to resolve would never show up in the "slow query" stats page as they were still resolving

Not sure what you are referring to, a function can only show in the slow query report after it resolved (successfully or by nodejs server timeout).

Another aspect to consider is that monitoring that covers only Cloud Code functions captures only a fraction of Parse Server performance, or not much at all, if Cloud Code functions are not used. To give a better picture of Parse Server it may make sense to cover jobs, trace triggers (where often a lot of magic happens), and direct endpoint calls.

dblythy

comment created time in 8 hours

pull request commentparse-community/parse-server

Fix typo in server definitions for emailVerifyTokenReuseIfValid

Done, my bad.

dblythy

comment created time in 8 hours

pull request commentparse-community/parse-server

fix: definitions for accountLockout and passwordPolicy

<!-- 0 failure: 0 warning:

1 markdown notices DangerID: danger-id-Peril; -->

Danger run resulted in 1 warning; to find out more, see the checks page. <p align="right"> Generated by :no_entry_sign: <a href="https://danger.systems/js">dangerJS</a> </p>

dblythy

comment created time in 8 hours

pull request commentparse-community/parse-server

Fix typo in server definitions for emailVerifyTokenReuseIfValid

Can you do npm run definitions?

dblythy

comment created time in 8 hours

issue commentparse-community/parse-server

Error 206 cannot modify user for new Facebook user

Thanks for the details. At which step in the iOS code does the server log 206 "Cannot modify user o7GT48TZZT."?

ashish-naik

comment created time in 8 hours

more