mirror of
https://github.com/modoboa/modoboa.git
synced 2026-04-25 17:06:01 +03:00
[GH-ISSUE #3317] Invalid client_id parameter value message when trying to access new-admin interface #1832
Labels
No labels
bug
bug
dependencies
design
documentation
duplicate
enhancement
enhancement
enhancement
feedback-needed
help-needed
help-needed
installer
invalid
looking-for-sponsors
modoboa-contacts
new-ui
new-ui
pr
pull-request
pyconfr
python
question
security
stale
webmail
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/modoboa-modoboa#1832
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @mirtouf on GitHub (Sep 13, 2024).
Original GitHub issue: https://github.com/modoboa/modoboa/issues/3317
Hi, here is my setup
Steps to reproduce
Try to access new-admin
Current behavior
The oauth challenge is giving an error straight in the web browser:
Error: invalid_request
Invalid client_id parameter value.
No other loading errors from the browser have been seen
Expected behavior
Access to new admin
I used to try new-admin when it was released with modoboa 2.0.0 but since then I have not been using it. I upgraded modoboa regularly following the instructions including the ones for new-admin and I cannot access the updated interface. As far as I remember it was working with modoboa 2.0.0.
I copied the settings.json from my venv and I updated the URL without modifying the OAUTH_CLIENT_ID parameter.
It could have been a topic for modoboa-users ML but the spam made it closed.
Is there a way to check elsewhere the OAUTH_CLIENT_ID value ?
@mirtouf commented on GitHub (Sep 13, 2024):
Is it possible that I missed a step during a migration ?
@tonioo commented on GitHub (Oct 8, 2024):
@mirtouf Sorry for the delay. Are you still encountering this issue?
@mirtouf commented on GitHub (Oct 8, 2024):
Hello,
indeed I still have the issue. Is it possible to debug the new-admin interface like the historical one ?
Are the steps still correct:
cd <modoboa_instance_dir>cp frontend/config.json ./rm -rf frontendcp -R <virtuenv_path>/lib/pythonX.X/site-packages/modoboa/frontend_dist/ frontend/cp ./config.json frontend/config.jsonand change API_BASE_URL ?
@tonioo commented on GitHub (Oct 9, 2024):
Have you updated the config.json file ?
@tonioo commented on GitHub (Oct 16, 2024):
@mirtouf up
@mirtouf commented on GitHub (Oct 16, 2024):
Hi,
I do have updated the config.json file. Is there a way to confirm the value of OAUTH_CLIENT_ID variable?
@tonioo commented on GitHub (Oct 16, 2024):
You need to look at the DB, there is a table containing all oauth2 apps
@egelhaus commented on GitHub (Oct 23, 2024):
Hi, im also having this Issue at trying to access the new Admin UI, can someone help me?
@Spitfireap commented on GitHub (Oct 31, 2024):
Can you try this :
python manage.py load_initial_data? It should fillconfig.json@egelhaus commented on GitHub (Nov 1, 2024):
@Spitfireap I'll try.
In which Directory do I have to run this?
@tonioo commented on GitHub (Nov 27, 2024):
@egelhaus In /srv/modoboa/instance for a regular installation. I suggest you read this section of the documentation first: https://modoboa.readthedocs.io/en/latest/upgrade.html#modoboa
@Spitfireap commented on GitHub (Dec 21, 2024):
up @egelhaus, @mirtouf
@mirtouf commented on GitHub (Dec 21, 2024):
Hi @Spitfireap ,
I was lacking time past month, so I will dig first week of January and I will provide you with details.
@stale[bot] commented on GitHub (Feb 25, 2025):
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
@mirtouf commented on GitHub (Apr 15, 2025):
I managed to get this empty page after checking the OAUTH_CLIENT_ID value just before the new error:
Error: invalid_request
Mismatching redirect URI.
I do not know how to handle the js errors in the console.
My config.json looks-like:
{ "API_BASE_URL": "/api/v2/", "API_DOC_URL": "/api/schema-v2/swagger/", "OAUTH_AUTHORITY_URL": "https://mail-admin.mirtouf.fr/api/o", "OAUTH_CLIENT_ID": "1234567r-2a03-4efh-b489-fc6c3c0d8c5e", "OAUTH_REDIRECT_URI": "https://mail-admin.mirtouf.fr/new-admin/login/logged", "OAUTH_POST_REDIRECT_URI": "https://mail-admin.mirtouf.fr/new-admin" }In the fronted_dist folder from the venv, this one was generated when I updated to modoboa 2.3.2:
{ "API_BASE_URL": "/api/v2/", "API_DOC_URL": "/api/schema-v2/swagger/", "OAUTH_AUTHORITY_URL": "https://localhost:8000/api/o", "OAUTH_CLIENT_ID": "LVQbfIIX3khWR3nDvix1u9yEGHZUxcx53bhJ7FlD", "OAUTH_REDIRECT_URI": "https://localhost:3000/login/logged", "OAUTH_POST_REDIRECT_URI": "https://localhost:3000/" }So, why is the OAUTH_CLIENT_ID not the correct value ?
@mirtouf commented on GitHub (Apr 16, 2025):
I am also reading #3377 to have another feedback.
@mirtouf commented on GitHub (Apr 16, 2025):
Is python manage.py load_initial_data the sole command to update the config.json file ?
@mirtouf commented on GitHub (Apr 16, 2025):
Found the culprit, in the table oauth2_provider_application, the rows redirect_uris and post_logout_redirect_uris have to be consistent with the json file.
In my case, I had to change years ago the fqdn for the modoboa app while keeping the old fqdn for my mail address, I see where it is coming from.