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

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

Also, can you check browser console logs? As I see you attached screenshots only from the debugger.

1 Like

@sunnyson I am very happy that you are helping me too! :slightly_smiling_face:

  1. What has to be defined in the admin panel?
  2. It’s really very interesting. In console logs I get “GET https: // localhost:4300/ net :: ERR_SSL_PROTOCOL_ERROR”. That could really be the solution. I wrote my front end in Angular. Do you have a hint for me?

@sunnyson and @DMehaffy
Thank you for the good tip! :+1:
The problem is now solved! :upside_down_face: :tada: :grinning: :beer:
6
I accidentally entered “https: // …” in “Redirection url”. :grimacing: Now I’ve learned something again! :star2:

Best greetings! :sunny:

1 Like

Yeah, that’s exactly what I was expecting to see in your console log and redirect URL. You’re welcome! :cowboy_hat_face:

1 Like

:blush: :+1: :+1:
Yep! :beer:

@DMehaffy @sunnyson :roll_eyes: Excuse me, I have one more question to ask. I deployed my Strapi app on Heroku. Regardless of what I put in “Redirect URL”, I get the status code 400. What could be the problem? Do I have to enter something in “server.js”?

After you deployed in heroke you should put your Public address instead of localhost into the redirect url.

@sunnyson Yes, I entered “https://my-app-name.herokuapp.com”, but I still got 400. :snail:
P.S.: I found the link below, but didn’t understand it. :thinking:
node.js - Change redirect url for Google provider in Strapi - Stack Overflow

@sunnyson @DMehaffy Oh, I understand, my strapi-back-end address has to be entered, not mein front-end address. :smiley: Now I can fall asleep better. :sleeping:
Many thanks!

1 Like

Where did you find back-end address? I’m also on Heroku. :slight_smile: