Got Status Code 400 (Bad Request) from "auth/email-confirmation" :(

Hi Guys,

my “auth/email-confirmation” doesn’t work anymore. :frowning: Unfortunately I can’t find out what the problem is.

Please see attachments:


Did I break something during the last update? :thinking:

Thanks in advance!

What’s the message content of the 400 error?

@DMehaffy e

Oh, in the database the col “confirmationToken” has the value “NULL”!
I don’t know why… :roll_eyes:

How could that happen?

What Strapi version are you on?

1 Like

@DMehaffy “strapi”: “3.3.3” :snail: Should I maybe do an update/upgrade?

You aren’t that far behind, but do you have extensions into the users-permissions plugin? As it appears the token wasn’t set when the user registered, and I’m wondering if you have some out-dated extensions.

1 Like

@DMehaffy Thank you for the first time, I’ll check it out immediately. I will report it.

@DMehaffy So, I’ve examined it carefully: The confirmation works, but the error message comes anyway. It is probably because the “confirmationToken” value is set back to “NULL” (in earlier versions, the “confirmationToken” is saved). In my extension I have no function that does that. It is most likely coming from Strapi. Would you like to test it yourself?
Please see Attachment.

I’ll do a test here in a few minutes, can you confirm what email provider you are using also?

1 Like

@DMehaffy SendGrid :snail:

Appears to be working fine for me, fresh project using sendgrid:

After confirming via the email, the token is removed and confirmed boolean is set to true:

1 Like

I’m guessing the issue is with some code that’s messing with your response (since you can see the confirmation is working in the database)

@DMehaffy Have you got the status 400? :roll_eyes:

Nope, that top screenshot (bottom left of my 6 monitors :laughing: sorry it’s a big screenshot) :

1 Like

Side point though :thinking: that initial confirmed value should be false, not null. Unrelated but should probably put in a bug report for that.

@DMehaffy :beer: Thank you very much for the first time and I will keep going until I find it :beetle:. As soon as I find out what the problem is, I’ll report it to you. :snail:

Please do. :slight_smile:

@DMehaffy I looked at it again. At first I got the status 302, but the “response” is “Undefined” (“message”: ‘Network Error’)? If I execute the confirmation again, I get the status 400. :thinking:
What status code do you get, 302?

P.S.: When I open “config”, I get the following infos. Is there a hint?

When you actually use the token yes you will get a 302 to the url you set in the admin panel to redirect the user.

1 Like

What URL have you defined in the admin panel?

1 Like