Okano Posted April 8, 2016 Report Share Posted April 8, 2016 (edited) Hi, I'm trying to login using the loginKey.When I login the first time, the event is triggered normally so I can get the loginKey and store it somewhere.When I try to login for the second time, I seek if I have some loginKey, if found I pass it to the details object but I get the following error: Error: Illegal value for [object Object] of type string: object (not a string) Follow a snippet of my testing code: https://gist.github.com/williamokano/2b5c858e738a7829b6481095fb5deb30 And here is the stack tracehttps://gist.github.com/williamokano/fbd64eb8b3aec7bf8c50d7a7e12d0177 Edited April 8, 2016 by Okano Quote Link to comment Share on other sites More sharing options...
Dr. McKay Posted April 8, 2016 Report Share Posted April 8, 2016 readFile gives you a Buffer, not a string. You need to stringify it using toString('utf8'). Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.