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

Know the answer?

Wrap commands and output in triple backticks and they will render as a code block.

Checking whether you’re signed in…

Have a different question? Ask it.

Related