Netlify Identity: GoTrue JS Demo site will let me create a new user, but not verify it via email or the `confirm` method

After following the prompts on the GoTrue JS Demo site, I’m at a loss trying to figure out why two different forms of user verification seem to fail. I’ve cloned this project and have been troubleshooting it at

  1. After plugging in my API endpoint, I’m successfully able to create a user via the controls in the 1. Sign up section.

  2. Within seconds, the confirmation email arrives in my inbox. When I click it, I see a split-second flash of browser redirection before I’m dumped back into the demo site with a confirmation_token parameter appended to the URL. I guess this means it worked?

  3. I add my API endpoint again and scroll down to the 3. Log in section. When I use the form to log in with the credentials I just created a minute ago, I get the error Email not confimed. :thinking: Maybe there’s some server error I can’t diagnose. In the 2. Confirm section above, I see that GoTrue JS makes a confirm method available. Maybe I can call that manually.

  4. So I add a new form that lets me paste the confirmation token into a field and pass that value to confirm at the push of a button. Here, I get the error Could not read verification params: json: cannot unmarshal object into Go struct field VerifyParams.token of type string.

I’m not familiar with Go, but this message looks more like a Go error than a JavaScript one. For due diligence, I visit the gotrue-js repo to check the confirm method’s signature. Indeed, it expects a string.

I’ve reached the limit of my troubleshooting ability here. I was hoping to use this library on a project, but wanted to make sure I understood it and could get it working via the demo.

I’d appreciate any help in clearing this hurdle.

Hi there and sorry to be slow to get back to you!

The problem here is in your #2 situation. This means you did NOT verify your email. You’ll see a prompt to configure a password if it works. If it doesn’t, then yes, the rest is expected.

The reason you have the URL with the token is that is intended - to be seen by netlify-identity-widget.js, which should be included in your /index.html file, which will trigger the completion (validation) of signup.

I suspect that once you get that piece working, everything else will make sense :slight_smile:

1 Like