WebAuth Signup cb parameter is not valid

Hello, I have the following code for sign ups:
const webAuth = new WebAuth({
domain: config.domain,
clientID: config.clientId,

      connection: 'Username-Password-Authentication',
      email: User.email,
      password: User.password,
      user_metadata: {},

I keep getting the error “cb parameter is not valid” during this operation. Does anyone have an idea of how to fix this?

Hey there!

Not sure if the issue comes from this exact code snippet. Do you use cb variable in the code file from which you extracted that code snippet? Do you have any hooks or rules created for that that your are using?

I don’t have any rules/hooks set up for my application. I am also not using the “Cb” variable in the code file anywhere. I tried to find info about this error, seems like it has something to do with the callback?

Found out the reason why, sign up takes a callback function as its 2nd parameter

1 Like

Glad you have figured it out!