Authentication not working after change of url path

Expected behavior

I just tried to update the base path of our express handlers for forest from ‘/admin/forest’ to ‘/forest’ and updated the APPLICATION_URL env variable accordingly.
I also updated the ‘Admin backend URL’ of all our environments.
Forest admin should work fine.

Actual behavior

I can’t authenticate on prod and staging environments. Here’s the result of the https://api.forestadmin.com/oidc/auth? call:

detail: "The redirect uri must be one of https://myapi.com/admin/forest/authentication/callback. Received \"https://myapi.com/forest/authentication/callback\""
meta: {}
name: "InvalidRedirectUriError"
status: 400

Can there be some kind of cache somewhere?

Failure Logs

Please include any relevant log snippets, if necessary.

Context

Please provide any relevant information about your setup.

  • Package Version: 8.0.4
  • Express Version: 4.17.1
  • Sequelize Version: 6.6.5
  • Database Dialect:
  • Database Version:
  • Project Name:

Hello @Vincent_Francois,

Indeed, the associated error reveals a bad applicationUrl which subsequently generates an http 400 error.
Have you updated the environment variables on the infrastructure provider side (Heroku for example) it seems that it is not up to date.

Kind regards,

Hi @lclisson

I’ve checked that APPLICATION_URL is correctly set to https://myapi.com in all our kubernetes pods.
Is there no need to restart something when the Admin backend URL of an env is changed?
It worked before I tried to change this and the change was made correctly on my dev env, FYI.

Is there anything you can do to help me on this or should I just revert my changes (which were done to avoid issues described in this other issue)?

Yes could you try to restart your staging server with your new env variable? It might solves your issue :slight_smile:

Let me know if it helps

Without any surprise, it did not… The env variable was already correctly set.
I’m reverting my change and we’ll live with the dirty hack :man_shrugging:

All right, your demand has already been pushed in our product board :slight_smile:
Sorry about the time taken