feathersjs-ecosystem/feathers-authentication-management

MYSQL Error Verifying e-mail Token

mikerhino opened this issue · 1 comments

Getting a mysql error upon email verification:

error: message=update users set isVerified = true, verifyToken = NULL, verifyShortToken = NULL, verifyExpires = NULL, verifyChanges = {} where id = 6 - ER_PARSE_ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'where id = 6' at line 1, type=FeathersError, name=BadRequest, code=400, className=bad-request, data=undefined, , stack=BadRequest: update users set isVerified = true, verifyToken = NULL, verifyShortToken = NULL, verifyExpires = NULL, verifyChanges = {} where id = 6 - ER_PARSE_ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'where id = 6' at line 1

The problem is the verifyChanges = {}, mysql rejects the curly braces as an error.

in lib/verifySignup.js line 62 if I change it from:

verifyChanges: {}

to

verifyChanges: NULL

I'm able to get by the error.

This issue being old we close it as we are trying to give a fresh look, please reopen if required and provide as much information as possible to reproduce it.