Tiger 🐅
Tiger 🐅6mo ago

Uncaught Error: Provider password is not configured

I'm getting this error when trying to sign up with the password provider via convex.
9 Replies
Tiger 🐅
Tiger 🐅OP6mo ago
its so annoying 😩 literally just following the docs
import Google from '@auth/core/providers/google'
import { Password } from '@convex-dev/auth/providers/Password'
import { convexAuth } from '@convex-dev/auth/server'

import { ResendOTP } from './ResendOTP'

export const { auth, signIn, signOut, store } = convexAuth({
providers: [Google, Password({ verify: ResendOTP })],
})
import Google from '@auth/core/providers/google'
import { Password } from '@convex-dev/auth/providers/Password'
import { convexAuth } from '@convex-dev/auth/server'

import { ResendOTP } from './ResendOTP'

export const { auth, signIn, signOut, store } = convexAuth({
providers: [Google, Password({ verify: ResendOTP })],
})
even when checking form data here it all exists
onSubmit(event) {
event.preventDefault()
const formData = new FormData(event.currentTarget)
console.log(Object.fromEntries(formData))
void signIn('password', formData).then(() => {
navigate(
ROUTES.auth.emailVerification(formData.get('email') as string)
)
})
},
onSubmit(event) {
event.preventDefault()
const formData = new FormData(event.currentTarget)
console.log(Object.fromEntries(formData))
void signIn('password', formData).then(() => {
navigate(
ROUTES.auth.emailVerification(formData.get('email') as string)
)
})
},
even when removing resend part still doesn't work same error
Tiger 🐅
Tiger 🐅OP6mo ago
im gonna rip my hair out
No description
Tiger 🐅
Tiger 🐅OP6mo ago
@Michal Srb @ian save me :sadSinon: i saw i missed the hidden flow input still same error <input name="flow" type="hidden" value="signUp" /> i now include it
erquhart
erquhart6mo ago
Check out that line at the top of the stack trace I would log from getProviderOrThrow to get a clue on what's happening exactly
Tiger 🐅
Tiger 🐅OP6mo ago
i think i know why looking at other support issues i dont have password in the auth table yeah that's likely it
erquhart
erquhart6mo ago
good find
Tiger 🐅
Tiger 🐅OP6mo ago
maybe tho! still would love to know how imma configure my schema for each provider im struggling with this for hours jeez actually wait a second do i need to run convex in a separate terminal maybe thats why im having all these issues playing around with it but no more luck need to start my work day
export const { auth, signIn, signOut, store } = convexAuth({
providers: [
Google,
Password({
id: 'password',
profile: (args) => {
console.log('args', args)
return {
name: 'test',
email: 'test',
image: 'test',
}
},
}),
],

callbacks: {
async createOrUpdateUser(ctx, args) {
if (args.existingUserId) {
return args.existingUserId
}

if (!args.profile.name) {
console.error('No name in profile', args.profile)
}

return ctx.db.insert('users', {
name: args.profile.name,
email: args.profile.email,
image: args.profile.image,
})
},
},
})
export const { auth, signIn, signOut, store } = convexAuth({
providers: [
Google,
Password({
id: 'password',
profile: (args) => {
console.log('args', args)
return {
name: 'test',
email: 'test',
image: 'test',
}
},
}),
],

callbacks: {
async createOrUpdateUser(ctx, args) {
if (args.existingUserId) {
return args.existingUserId
}

if (!args.profile.name) {
console.error('No name in profile', args.profile)
}

return ctx.db.insert('users', {
name: args.profile.name,
email: args.profile.email,
image: args.profile.image,
})
},
},
})
erquhart
erquhart6mo ago
You would need the dev server running so your code is deploying, and your auth.config.js/ts setup as well
Tiger 🐅
Tiger 🐅OP6mo ago
Yeah That helped + the return of profile I'm getting in the right direction Gonna try again some more this evening Hopefully i can get it to work With resend I honestly just want a magic link But will see if I can get that to work npx and then set the auth resend api key then the magic link should work i had the env var locally thought that was enough but this was a convex env var