Login when upgrading to v7.
I am upgrading a project from the version 6 to 7 (I aim to upgrade to v9 later).
When upgrading to v7 I can’t login anymore. I have an error 401 with the message “Invalid password”.
To be able to login correctly. In v6 login works well.
“detail”:“Forest cannot authenticate the user for this request.”,
- Project name: interbev
- Team name: Galadrim
- Environment name: Production
- Agent (forest package) name & version: 6.0.0 to 7.12.5
- Database type: mysql
- Recent changes made on your end if any: upgrade to v7
Did you read the migration note and follow all the breaking changes migration guidelines?
Yes, we did follow the migration note, updated the app.js, forestadmin.js, indexs.js files and created the config/databases.js.
Ok, let’s try to find the guilty thing. We need a bit more information to help you diagnose this issue.
- Can you share your
- Could you give me more context about your issue (Network tabs of your browser, logs of your server if any, etc)?
- Did you define a static
CLIENT_ID? (The whole part about static
CLIENT_ID is not mandatory anymore.)
That’s the URL for your production environment.
- Did you try with a development environment first?
It tries to call the old endpoint. This endpoint has been removed since the v7 so it’s a really weird behavior. I will double-check with the team.
We detected that your version is still outdated.
- Production version is 6.5.0
- Development version is 6.5.0 too
Are you sure you synchronise the schemas? You need to remove the
NODE_ENV=production to make the synchronisation happen.
Let me know if it helps.
Alright, this was the issue.
Could you tell me why we had to remove the NODE_ENV variable though ?
Well, that is an issue that has been tackled on the latest versions of our agent (with more variables to control this behavior)…
The idea is that the changes should not be done in production but should be done in development or a remote environment before going to production.
This way we ensure you don’t delete everything in production by mistake.
Let me know if you have any more questions.
I think we can close the issue, thank you a lot for your answers.