nextjs-edgedb-auth-template icon indicating copy to clipboard operation
nextjs-edgedb-auth-template copied to clipboard

Running dev server against Cloud is broken

Open elprans opened this issue 1 year ago • 2 comments

pnpm dev seems to force NODE_ENV=development (at least the app ignores .env), and so the EdgeDB client ends up with tlsSecurity=insecure, which does not work with Cloud. Not sure if it's a template issue or an edgedb-js issue, but dev flows should work with Cloud out of the box.

elprans avatar Oct 12 '24 23:10 elprans

Yeah, it's next that forces NODE_ENV to be development when running dev server (relevant code).

@scotttrinh, should we skip the insecure setting in the EdgeDB client setup?

beerose avatar Oct 17 '24 12:10 beerose

The insecure setting should NOT actually drop HTTPS altogether. Instead, it should be ignoring TLS errors. The only place where not doing HTTPS makes sense is in frontend code where the browser will get in the way of insecure requests. Backend should always attempt to do HTTPS.

elprans avatar Oct 17 '24 15:10 elprans