Hard coded localhost prevents smooth tests when deployed online.
Reproduce bug
- Open https://lingua-libre.toolforge.org, (log out if needed), then try login in : observe fails.
Proposal approach
Refactor code to set host and Oauth as config.ini variables.
- Rely more on config.ini variables, with [oauth]
- Clean settings.py's assignements and conditionals
- Deprecate hard-coded localhost (127.0.0.1:) in rest of the code.
Rely more on config.ini
✅ See commit :
- https://gitlab.wikimedia.org/repos/wikimedia-france/lingua-libre/lingua-libre/-/blob/main/config.ini.sample | config.ini.sample ]] and your own config.ini
- add callback_url
- add login_url
- settings.py > change assignments
- settings.py > change conditionals
Update instances config.ini
- Toolforge [EDIT]: NOW OUR SHARED TEST DEPLOYMENT SERVER
- Vercel [EDIT]: PROJECT CLOSED.
Deprecate hard-coded localhost
With the help of AI agents, check and possibly replace localhost in the code by suitable variables calls as in :
- VITE_HOST : example of variable call via import.meta.env.VITE_HOST
- Search 0.0.1: > front-end/src/utils/getLocutorRecordings.js#L9 : replace by import.meta.env.VITE_HOST as in front-end/src/App.vue#L12 ??
- Search 0.0.0 > vite.config.js#L13 replace by import.meta.env.VITE_HOST as in front-end/src/App.vue#L12 ??
Update documentation
- Identify files (note: I believe none needs update but double check is better)
- Update documentation



