seamapi / nextlove

An NPM module that has best practices and essential modules for building APIs with NextJS
21 stars 2 forks source link

expose onMultipleAuthMiddlewareFailures binding on route level #130

Closed mikelittman closed 10 months ago

mikelittman commented 10 months ago

not sure if this is needed, definitely feels like a bit of an early optimization. I felt like we might want the ability to override the onMultipleAuthMiddlewareFailures binding declared in setup params at the route level as we continue to add support for multiple auth handlers for a route. this will allow us to override the "global" handler as the route configuration will take precedence.

mikelittman commented 10 months ago

@codetheweb tests look okay here? there wasn't existing tests to guide me so it might be wrong

codetheweb commented 10 months ago

there wasn't existing tests to guide me so it might be wrong

this repo is set up a little weird, there's tests for nextlove in apps/example-todo-app/tests/**

I'd probably add a new endpoint to the example app and test against that

mikelittman commented 10 months ago

@codetheweb test added