edgedb / edgedb-examples

EdgeDB example projects for different stacks
61 stars 22 forks source link

Add EdgeDB Auth + Express example app #116

Closed scotttrinh closed 7 months ago

scotttrinh commented 7 months ago

Very barebones example app:

Blocked on publishing the express auth helper package, but tested locally via npm link.

raddevon commented 7 months ago

We should add some step-by-step instructions to the readme on how to run this app. I haven't been able to do that successfully myself, and I'm not sure if that is due to the express auth helper package you mentioned in your description or due to something else. Here's what I tried:

  1. Run edgedb project init
  2. Run npm install
  3. Run npm run dev

I get this:

Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/Users/raddevon/Documents/projects/edgedb/edgedb-examples/express-auth/index.ts' imported from /Users/raddevon/Documents/projects/edgedb/edgedb-examples/express-auth/
scotttrinh commented 7 months ago

@raddevon

Thanks for the reminder, I actually fixed this already but didn't update the version of the library installed here. Will fix.

scotttrinh commented 7 months ago

@raddevon ready to review!

scotttrinh commented 7 months ago

@raddevon

Apologies for the sloppy implementation of the separate "custom UI" app. I had it working when I was switching back and forth, but when I moved it to a separate app entrypoint, I didn't do any testing and used a different route structure, as you noticed.

You were correct to change the actions to have an email-password prefix route, but the other thing I wasn't handling here was if you had require_verification set to true 🤦 I personally never use that option but didn't think about how it would affect the example. I've fixed that now as well!

I'll merge you README suggestion and feel free to check it out again. Thanks for the help and apologies for having to go back and forth here!

raddevon commented 7 months ago

No need for apologies, @scotttrinh. That back and forth is exactly what review is for!

Thank you! I'll give it another look.