System Information
Strapi Version : 3.5.1
Operating System :
Database :
Node Version :
NPM Version :
Yarn Version :
I’m struggling with getting email confirmation working correctly in production. Locally it works fine.
When the user clicks on the link in the email I get:-
{"statusCode":400,"error":"Bad Request","message":"token.invalid"}
The confirmation true does seem to have been applied though in the database, but the user is stuck here and doesn’t get forwarded to the URL set in advanced settings.
Locally it works correctly.
Any help greatly appreciated.
1 Like
As per documentation I have production server.js with an environment var of my strapi admin url
I can see on github that this issue was described in March but no updates on it, was it solved in a strapi update?
opened 05:42PM - 04 Mar 21 UTC
type: bug
severity: medium
source: admin
status: pending reproduction
<!--
Hello 👋 Thank you for submitting an issue.
Before you start, please mak… e sure your issue is understandable and reproducible.
To make your issue readable make sure you use valid Markdown syntax.
https://guides.github.com/features/mastering-markdown/
Please ensure you have also read and understand the contributing guide.
https://github.com/strapi/strapi/blob/master/CONTRIBUTING.md#reporting-an-issue
-->
## Bug report
### Describe the bug
New user signs up, receives email verification message, clicks on link, and Strapi returns error.
This is a new user, new email.
### Steps to reproduce the behavior
- New user signs in
- Receives email verification with token.
- Clicks on email verification link and receives the following message:
```
{"statusCode":400,"error":"Bad Request","message":"token.invalid"}
```
### Expected behavior
The verification link should reroute to a success page.
### System
- Node.js version: v10.16.0
- NPM version: 6.9.0
- Strapi version: 3.5.2
- Database: SQLite
- Operating system: Ubuntu 18.04
### Additional context
Not sure if this has anything to do with the error, but I noticed that (a) even though Strapi returns an error and doesn't reroute to success page -- the new user is, in fact, verified and (b) the 'block user' boolean switch in the user entry in the Strapi backend is blank -- neither true nor false. I'm wondering if this, somehow, is the cause of the error?
I'm using SQLite, and up until moving from 3.4.4 to 3.5.2 the other day -- the user verification process has always worked. Never returned an error for a new user verification with a valid token.
I reverted back to 3.4.4 -- same SQLite database -- and re-ran the verification process (making sure the user is new and the email is new) and the verification email link works fine. It reroutes to the front-end success page. User is verified in the backend, and the 'block user' switch is set to off (as it should be).
I submitted the issue back in March.
I still have the issue – even with the 3.6.7 update of Strapi.
The issue has forced me to confirm new users manually. (Fortunately, it’s for an internal intranet site – so the work involved in manual confirmation is pretty minimal.)
BTW – your description of the error matches my error exactly.
1 Like
This issue appears to be fixed in 3.6.8
.
hello did you find a solution??