Skip to content

← All questions

auth.strategy "custom" needs an auth export in steps/auth.ts, and I wrote one

Asked 3,610 views1 answer

Our login is a two-step form — email, continue, then password on the next screen — so the four selectors in auth.form do not cover it. Set the strategy to custom and wrote the file:

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

projects/shop/steps/auth.ts exists and exports auth. It is a defineAuth call with strategy: 'custom' in it. What is it looking for that I have not given it?

asked by Devon Marsh183 ·

1 answer

Have the same question?

Ask it with the command you ran and the output you got, and it will be answered here.

Ask a question

Related