Created
March 23, 2022 19:24
-
-
Save ChristianOConnor/de62cfe1f29dfde059a67dec914df6f6 to your computer and use it in GitHub Desktop.
nuxt express backend auth fail 03/23/22
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<myusername>@<mycomputername> appBackend % npm run dev | |
> [email protected] dev | |
> nodemon --exec babel-node ./src/bin/www | |
[nodemon] 2.0.15 | |
[nodemon] to restart at any time, enter `rs` | |
[nodemon] watching path(s): *.* | |
[nodemon] watching extensions: js,mjs,json | |
[nodemon] starting `babel-node ./src/bin/www` | |
Connected to the in-memory SQlite database. | |
Created messages table | |
Created users table | |
User requested address: <myaddress> | |
User does not exist | |
GET /users/<myaddress> 304 10.762 ms - - | |
User created | |
POST /users/register 201 8.603 ms - 12 | |
GET /users/<myaddress>/nonce 200 1.400 ms - 18 | |
User nonce from db: 222830 | |
Decrypted address: <myaddress> | |
User address: <myaddress> | |
Request being made to OpenSea to check if user owns NFT from collection: https://api.opensea.io/api/v1/assets?owner=<myaddress>&collection=treasures-of-goddess | |
POST /users/<myaddress>/signature 200 25.083 ms - 345 | |
{ | |
address: '<myaddress>', | |
nonce: 314818, | |
iat: 1648063063 | |
} | |
User requested messages | |
GET /messages 304 1.553 ms - - | |
User does not own NFT from collection | |
node:_http_outgoing:576 | |
throw new ERR_HTTP_HEADERS_SENT('set'); | |
^ | |
Error: Cannot set headers after they are sent to the client | |
at new NodeError (node:internal/errors:371:5) | |
at ServerResponse.setHeader (node:_http_outgoing:576:11) | |
at ServerResponse.header (/Users/<myusername>/Desktop/Dev/NftAuth/appBackend/node_modules/express/lib/response.js:767:10) | |
at ServerResponse.send (/Users/<myusername>/Desktop/Dev/NftAuth/appBackend/node_modules/express/lib/response.js:170:12) | |
at Request._callback (/Users/<myusername>/Desktop/Dev/NftAuth/appBackend/src/routes/users.js:143:52) | |
at Request.self.callback (/Users/<myusername>/Desktop/Dev/NftAuth/appBackend/node_modules/request/request.js:185:22) | |
at Request.emit (node:events:390:28) | |
at Request.emit (node:domain:475:12) | |
at Request.<anonymous> (/Users/<myusername>/Desktop/Dev/NftAuth/appBackend/node_modules/request/request.js:1154:10) | |
at Request.emit (node:events:390:28) { | |
code: 'ERR_HTTP_HEADERS_SENT' | |
} | |
[nodemon] app crashed - waiting for file changes before starting... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment