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

Quote Error #519

Closed
Clowning opened this Issue May 26, 2017 · 4 comments

Comments

Projects
None yet
3 participants
@Clowning
Copy link

Clowning commented May 26, 2017

Hi there,

I'm working on a project and i need to implemente a Facebook login but i've an issue!

When FeatherJS need to create a user into my database (Mysql with KnexJS) i've an error : "ER_WRONG_VALUE_COUNT_ON_ROW: Column count doesn't match value count at row 1"

After some research i know why ! When FeatherJs try to add a new user it doesn't add single quote around the JSON object, and without these quote, MYSQL says.. No!

So do you have an idea to transform this ->

insert into `users` (`facebook`, `facebookId`) values ({"profile":{"id":"1306478419467189","displayName":"Popi Popo","name":{},"provider":"facebook","_raw":"{\"id\":\"1306478419467189\",\"name\":\"Popi Popo\"}","_json":{"id":"1306478419467189","name":"Popi Popo"}},"accessToken":"EAAbY4lfNNakBAokokigv5uYzoh225VZC3LwMcPcWohwwITqpQerNTjUTD2gBInKISPDft60ZBoYQ1cq950cw8v58LW4QCPy4MxLXthRgro3xNZBDxViloyI8y6THiWD8s5tGv7r822M2OrHAKZAo2Yzb0Y5zgU4x4GGq5R4ZC0AZDZD"}, '1300408410467080')

to

insert into `users` (`facebook`, `facebookId`) values ('{"profile":{"id":"1306478419467189","displayName":"Popi Popo","name":{},"provider":"facebook","_raw":"{\"id\":\"1306478419467189\",\"name\":\"Popi Popo\"}","_json":{"id":"1306478419467189","name":"Popi Popo"}},"accessToken":"EAAbY4lfNNakBAokokigv5uYzoh225VZC3LwMcPcWohwwITqpQerNTjUTD2gBInKISPDft60ZBoYQ1cq950cw8v58LW4QCPy4MxLXthRgro3xNZBDxViloyI8y6THiWD8s5tGv7r822M2OrHAKZAo2Yzb0Y5zgU4x4GGq5R4ZC0AZDZD"}', '1300408410467080')

Thank :-)

@daffl

This comment has been minimized.

Copy link
Member

daffl commented Jun 22, 2017

What version of feathers-authentication are you using?

@ekryski

This comment has been minimized.

Copy link
Member

ekryski commented Jul 4, 2017

I don't think this is a Feathers or feathers-authentication issue. Feathers-authentication isn't doing anything special to the JSON object. That is on you as the developer, to customize the data in a before hook before it is inserted in the DB.

@Clowning is this still an issue for you?

@ekryski

This comment has been minimized.

Copy link
Member

ekryski commented Jul 24, 2017

Since we haven't heard anything back in some time, I'm going to close this issue and assume it's been resolved. If it is still an issue we can re-open. 😄

@ekryski ekryski closed this Jul 24, 2017

@Clowning

This comment has been minimized.

Copy link
Author

Clowning commented Jul 24, 2017

Oh i'm sorry ! It good, it's just because i'm stupid ! Not feathers :D ahha

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.