Warning if facebook app id is invalid
Is your feature or enhancement related to a problem? Please describe.
I'm blocked on "Authenticating you with Facebook..."
The chatwoot page source contains "FB_APP_ID": "5.02222222220797e+14" (redacted). It seems the environment variable is considered a number instead of a string.
Describe the solution you'd like
Best solution: accept numeric env variable gracefully (there is no information lost, the number is just badly formatted)
Also add a warning if the app is in an invalid format.
Describe alternatives you've considered
Only the warning.
Additional context
Could be because of kubernetes/helm.
@thgh Environment variables are stored as strings, regardless of their content. There is no standard way to test whether a value is a valid Facebook App ID. A basic number check doesn't ensure that the ID is valid. Considering that this is a very high effort for a low value outcome, we will not be proceeding with this.
I understand it takes some effort to check if the ID is valid, but it takes minimal effort to show a warning if it's misformatted: /^\d+$/
Would you accept a PR?
@thgh The question is where to show it. Here are the options I've thought of and all of them are quite complex for the value it returns.
- We could disallow users from starting the server if the variable is invalid. However, this would lead to many unnecessary support questions and result in poor user experience.
- If we allow them to start the server, the SuperAdmin console is the only place to show the error message, but it's not a screen people regularly visit.
- Showing the error on the UI where the agent/admin sees the integration isn't useful since these are usually not the people who configure the server.
Let me know if I miss anything.
- Showing the error on the UI where the agent/admin -> sounds perfect.
Setting up Facebook is highly technical, the screenshots in the docs are outdated making it very challenging for technical people to set it up, let alone non-technical people.
It's also a recurring topic in Github issues:
https://github.com/chatwoot/chatwoot/issues/1822 https://github.com/chatwoot/chatwoot/issues/4752 https://github.com/chatwoot/chatwoot/issues/5147 https://github.com/chatwoot/chatwoot/issues/5953 https://github.com/chatwoot/chatwoot/issues/8180
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.