Skip to content

← All questions

record --user stops with: auth.strategy "custom" needs an auth export

Example threads. These questions and answers were written by the SDODS team to document real problems and how to fix them. The people named are illustrative, not real users. Questions asked on this site are marked new.

Our login is bespoke, so the project yaml says:

yaml
auth:
  strategy: custom
  storageState: true

And every recording with a role stops immediately:

text
✖ CONFIG_INVALID: auth.strategy "custom" needs an `auth` export in projects/demo-shop/steps/auth.ts.
  hint: export const auth = defineAuth({ strategy: 'custom', login: async ({ page, user }) => { ... } })

The file is right there. What is it actually looking for?

2 answers

Have a different question? Ask it.

Related