dertinfo / dertinfo/dertinfo-api
[BUG] Issues with calling the API when Auth0:Domain is set in appsettings and not secrets
- Dominant language
- C#
- Stars
- 0
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
When the setting "Auth0:Domain" is moved from the secrets.json to appsettings.json in a development environment we receive errors when calling the API from the client app.
When proceeding from the homepage of the client application (dertinfo-web) to the dashboard the API calls fail with the error outlined below.
> System.InvalidOperationException: IDX20803: Unable to obtain configuration from: 'System.String'.
---> System.IO.IOException: IDX20804: Unable to retrieve document from: 'System.String'.
---> System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception.
---> System.Security.Authentication.AuthenticationException: The remote certificate is invalid according to the validation procedure: RemoteCertificateNameMismatch
at System.Net.Security.SslStream.SendAuthResetSignal(ProtocolToken message, ExceptionDispatchInfo exception)
at System.Net.Security.SslStream.ForceAuthenticationAsync[TIOAdapter](TIOAdapter adapter, Boolean receiveFirst, Byte[] reAuthenticationData, Boolean isApm)
at System.Net.Security.SslStream.<>c.b__169_2(Task t, Object s)
at System.Threading.Tasks.ContinuationTaskFromTask.InnerInvoke()
at System.Threading.Tasks.Task.<>c.<.cctor>b__277_0(Object obj)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
It is unclear what causes this issue but it definitely is something to do with the mentioned very specific setting.
**To Reproduce**
Steps to reproduce the behavior:
1. Remove the setting from secrets.json
2. Populate the appsetting.json placeholder with the value
3. Launch the web app and the API
4. Open developer tools in browser and watch the network
5. Attempt to proceed to the dashboard from the homepage.
6. If you have logged in and have a token you will see errors in the network tab on the browser
**Expected behavior**
The application can gain the dashboard and user is displayed their teams and events
**Screenshots**
N/A
**Desktop (please complete the following information):**
- OS: Windows
- Browser chrome
**Smartphone (please complete the following information):**
N/A
**Additional context**
N/A
Contributor guide
Assessment
This issue has not been assessed yet.