refactor: improve auth flow #189
Annotations
9 errors and 2 warnings
tests/api/private/index.test.ts > GET: http://127.0.0.1:31577/api/private:
server/tests/api/apiClient.ts#L34
Error: {"message":"Request failed with status code 401","name":"AxiosError","stack":"AxiosError: Request failed with status code 401\n at settle (file:///home/runner/work/next-frourio-starter/next-frourio-starter/server/node_modules/axios/lib/core/settle.js:19:12)\n at IncomingMessage.handleStreamEnd (file:///home/runner/work/next-frourio-starter/next-frourio-starter/server/node_modules/axios/lib/adapters/http.js:589:11)\n at IncomingMessage.emit (node:events:531:35)\n at endReadableNT (node:internal/streams/readable:1696:12)\n at processTicksAndRejections (node:internal/process/task_queues:82:21)","config":{"transitional":{"silentJSONParsing":true,"forcedJSONParsing":true,"clarifyTimeoutError":false},"adapter":["xhr","http"],"transformRequest":[null],"transformResponse":[null],"timeout":0,"xsrfCookieName":"XSRF-TOKEN","xsrfHeaderName":"X-XSRF-TOKEN","maxContentLength":-1,"maxBodyLength":-1,"env":{},"headers":{"Accept":"application/json, text/plain, */*","Content-Type":"text/plain","cookie":"session=undefined","User-Agent":"axios/1.6.8","Accept-Encoding":"gzip, compress, deflate, br"},"baseURL":"http://127.0.0.1:31577/api","paramsSerializer":{},"url":"/private","method":"get","responseType":"text"},"code":"ERR_BAD_REQUEST","status":401}
❯ tests/api/apiClient.ts:34:46
❯ Axios.request node_modules/axios/lib/core/Axios.js:40:14
❯ Object.text node_modules/@aspida/axios/index.ts:27:12
❯ tests/api/private/index.test.ts:7:15
❯ Axios.request node_modules/axios/lib/core/Axios.js:45:41
❯ Object.text node_modules/@aspida/axios/index.ts:27:12
❯ tests/api/private/index.test.ts:7:15
|
tests/api/private/index.test.ts > GET: http://127.0.0.1:31577/api/private/me:
server/tests/api/apiClient.ts#L34
Error: {"message":"Request failed with status code 401","name":"AxiosError","stack":"AxiosError: Request failed with status code 401\n at settle (file:///home/runner/work/next-frourio-starter/next-frourio-starter/server/node_modules/axios/lib/core/settle.js:19:12)\n at IncomingMessage.handleStreamEnd (file:///home/runner/work/next-frourio-starter/next-frourio-starter/server/node_modules/axios/lib/adapters/http.js:589:11)\n at IncomingMessage.emit (node:events:531:35)\n at endReadableNT (node:internal/streams/readable:1696:12)\n at processTicksAndRejections (node:internal/process/task_queues:82:21)","config":{"transitional":{"silentJSONParsing":true,"forcedJSONParsing":true,"clarifyTimeoutError":false},"adapter":["xhr","http"],"transformRequest":[null],"transformResponse":[null],"timeout":0,"xsrfCookieName":"XSRF-TOKEN","xsrfHeaderName":"X-XSRF-TOKEN","maxContentLength":-1,"maxBodyLength":-1,"env":{},"headers":{"Accept":"application/json, text/plain, */*","Content-Type":"text/plain","cookie":"session=undefined","User-Agent":"axios/1.6.8","Accept-Encoding":"gzip, compress, deflate, br"},"baseURL":"http://127.0.0.1:31577/api","paramsSerializer":{},"url":"/private/me","method":"get","responseType":"json"},"code":"ERR_BAD_REQUEST","status":401}
❯ tests/api/apiClient.ts:34:46
❯ Axios.request node_modules/axios/lib/core/Axios.js:40:14
❯ Object.json node_modules/@aspida/axios/index.ts:27:12
❯ tests/api/private/index.test.ts:17:15
❯ Axios.request node_modules/axios/lib/core/Axios.js:45:41
❯ Object.json node_modules/@aspida/axios/index.ts:27:12
❯ tests/api/private/index.test.ts:17:15
|
tests/api/private/tasks.test.ts > GET: http://127.0.0.1:31577/api/private/tasks:
server/tests/api/apiClient.ts#L34
Error: {"message":"Request failed with status code 401","name":"AxiosError","stack":"AxiosError: Request failed with status code 401\n at settle (file:///home/runner/work/next-frourio-starter/next-frourio-starter/server/node_modules/axios/lib/core/settle.js:19:12)\n at IncomingMessage.handleStreamEnd (file:///home/runner/work/next-frourio-starter/next-frourio-starter/server/node_modules/axios/lib/adapters/http.js:589:11)\n at IncomingMessage.emit (node:events:531:35)\n at endReadableNT (node:internal/streams/readable:1696:12)\n at processTicksAndRejections (node:internal/process/task_queues:82:21)","config":{"transitional":{"silentJSONParsing":true,"forcedJSONParsing":true,"clarifyTimeoutError":false},"adapter":["xhr","http"],"transformRequest":[null],"transformResponse":[null],"timeout":0,"xsrfCookieName":"XSRF-TOKEN","xsrfHeaderName":"X-XSRF-TOKEN","maxContentLength":-1,"maxBodyLength":-1,"env":{},"headers":{"Accept":"application/json, text/plain, */*","Content-Type":"text/plain","cookie":"session=undefined","User-Agent":"axios/1.6.8","Accept-Encoding":"gzip, compress, deflate, br"},"baseURL":"http://127.0.0.1:31577/api","paramsSerializer":{},"url":"/private/tasks","method":"get","responseType":"json"},"code":"ERR_BAD_REQUEST","status":401}
❯ tests/api/apiClient.ts:34:46
❯ Axios.request node_modules/axios/lib/core/Axios.js:40:14
❯ Object.json node_modules/@aspida/axios/index.ts:27:12
❯ tests/api/private/tasks.test.ts:7:15
❯ Axios.request node_modules/axios/lib/core/Axios.js:45:41
❯ Object.json node_modules/@aspida/axios/index.ts:27:12
❯ tests/api/private/tasks.test.ts:7:15
|
tests/api/private/tasks.test.ts > POST: http://127.0.0.1:31577/api/private/tasks:
server/tests/api/apiClient.ts#L34
Error: {"message":"Request failed with status code 401","name":"AxiosError","stack":"AxiosError: Request failed with status code 401\n at settle (file:///home/runner/work/next-frourio-starter/next-frourio-starter/server/node_modules/axios/lib/core/settle.js:19:12)\n at IncomingMessage.handleStreamEnd (file:///home/runner/work/next-frourio-starter/next-frourio-starter/server/node_modules/axios/lib/adapters/http.js:589:11)\n at IncomingMessage.emit (node:events:531:35)\n at endReadableNT (node:internal/streams/readable:1696:12)\n at processTicksAndRejections (node:internal/process/task_queues:82:21)","config":{"transitional":{"silentJSONParsing":true,"forcedJSONParsing":true,"clarifyTimeoutError":false},"adapter":["xhr","http"],"transformRequest":[null],"transformResponse":[null],"timeout":0,"xsrfCookieName":"XSRF-TOKEN","xsrfHeaderName":"X-XSRF-TOKEN","maxContentLength":-1,"maxBodyLength":-1,"env":{},"headers":{"Accept":"application/json, text/plain, */*","Content-Type":"multipart/form-data; boundary=axios-1.6.8-boundary-VzF_FCD1kJ_b5ikoYP9DEcxw7","cookie":"session=undefined","User-Agent":"axios/1.6.8","Content-Length":"155","Accept-Encoding":"gzip, compress, deflate, br"},"baseURL":"http://127.0.0.1:31577/api","paramsSerializer":{},"url":"/private/tasks","method":"post","responseType":"json","data":{}},"code":"ERR_BAD_REQUEST","status":401}
❯ tests/api/apiClient.ts:34:46
❯ Axios.request node_modules/axios/lib/core/Axios.js:40:14
❯ Object.json node_modules/@aspida/axios/index.ts:27:12
❯ tests/api/private/tasks.test.ts:16:15
❯ Axios.request node_modules/axios/lib/core/Axios.js:45:41
❯ Object.json node_modules/@aspida/axios/index.ts:27:12
❯ tests/api/private/tasks.test.ts:16:15
|
tests/api/private/tasks.test.ts > PATCH: http://127.0.0.1:31577/api/private/tasks:
server/tests/api/apiClient.ts#L34
Error: {"message":"Request failed with status code 401","name":"AxiosError","stack":"AxiosError: Request failed with status code 401\n at settle (file:///home/runner/work/next-frourio-starter/next-frourio-starter/server/node_modules/axios/lib/core/settle.js:19:12)\n at IncomingMessage.handleStreamEnd (file:///home/runner/work/next-frourio-starter/next-frourio-starter/server/node_modules/axios/lib/adapters/http.js:589:11)\n at IncomingMessage.emit (node:events:531:35)\n at endReadableNT (node:internal/streams/readable:1696:12)\n at processTicksAndRejections (node:internal/process/task_queues:82:21)","config":{"transitional":{"silentJSONParsing":true,"forcedJSONParsing":true,"clarifyTimeoutError":false},"adapter":["xhr","http"],"transformRequest":[null],"transformResponse":[null],"timeout":0,"xsrfCookieName":"XSRF-TOKEN","xsrfHeaderName":"X-XSRF-TOKEN","maxContentLength":-1,"maxBodyLength":-1,"env":{},"headers":{"Accept":"application/json, text/plain, */*","Content-Type":"multipart/form-data; boundary=axios-1.6.8-boundary-E_aHITFhg8G93eDHo3zBdieoV","cookie":"session=undefined","User-Agent":"axios/1.6.8","Content-Length":"155","Accept-Encoding":"gzip, compress, deflate, br"},"baseURL":"http://127.0.0.1:31577/api","paramsSerializer":{},"url":"/private/tasks","method":"post","responseType":"json","data":{}},"code":"ERR_BAD_REQUEST","status":401}
❯ tests/api/apiClient.ts:34:46
❯ Axios.request node_modules/axios/lib/core/Axios.js:40:14
❯ Object.json node_modules/@aspida/axios/index.ts:27:12
❯ tests/api/private/tasks.test.ts:25:16
❯ Axios.request node_modules/axios/lib/core/Axios.js:45:41
❯ Object.json node_modules/@aspida/axios/index.ts:27:12
❯ tests/api/private/tasks.test.ts:25:16
|
tests/api/private/tasks.test.ts > DELETE: http://127.0.0.1:31577/api/private/tasks:
server/tests/api/apiClient.ts#L34
Error: {"message":"Request failed with status code 401","name":"AxiosError","stack":"AxiosError: Request failed with status code 401\n at settle (file:///home/runner/work/next-frourio-starter/next-frourio-starter/server/node_modules/axios/lib/core/settle.js:19:12)\n at IncomingMessage.handleStreamEnd (file:///home/runner/work/next-frourio-starter/next-frourio-starter/server/node_modules/axios/lib/adapters/http.js:589:11)\n at IncomingMessage.emit (node:events:531:35)\n at endReadableNT (node:internal/streams/readable:1696:12)\n at processTicksAndRejections (node:internal/process/task_queues:82:21)","config":{"transitional":{"silentJSONParsing":true,"forcedJSONParsing":true,"clarifyTimeoutError":false},"adapter":["xhr","http"],"transformRequest":[null],"transformResponse":[null],"timeout":0,"xsrfCookieName":"XSRF-TOKEN","xsrfHeaderName":"X-XSRF-TOKEN","maxContentLength":-1,"maxBodyLength":-1,"env":{},"headers":{"Accept":"application/json, text/plain, */*","Content-Type":"multipart/form-data; boundary=axios-1.6.8-boundary-GRu7ssPVbX0tVg0za_LR0D4be","cookie":"session=undefined","User-Agent":"axios/1.6.8","Content-Length":"155","Accept-Encoding":"gzip, compress, deflate, br"},"baseURL":"http://127.0.0.1:31577/api","paramsSerializer":{},"url":"/private/tasks","method":"post","responseType":"json","data":{}},"code":"ERR_BAD_REQUEST","status":401}
❯ tests/api/apiClient.ts:34:46
❯ Axios.request node_modules/axios/lib/core/Axios.js:40:14
❯ Object.json node_modules/@aspida/axios/index.ts:27:12
❯ tests/api/private/tasks.test.ts:35:16
❯ Axios.request node_modules/axios/lib/core/Axios.js:45:41
❯ Object.json node_modules/@aspida/axios/index.ts:27:12
❯ tests/api/private/tasks.test.ts:35:16
|
tests/api/private/tasks.test.ts > PATCH: http://127.0.0.1:31577/api/private/tasks/_taskId:
server/tests/api/apiClient.ts#L34
Error: {"message":"Request failed with status code 401","name":"AxiosError","stack":"AxiosError: Request failed with status code 401\n at settle (file:///home/runner/work/next-frourio-starter/next-frourio-starter/server/node_modules/axios/lib/core/settle.js:19:12)\n at IncomingMessage.handleStreamEnd (file:///home/runner/work/next-frourio-starter/next-frourio-starter/server/node_modules/axios/lib/adapters/http.js:589:11)\n at IncomingMessage.emit (node:events:531:35)\n at endReadableNT (node:internal/streams/readable:1696:12)\n at processTicksAndRejections (node:internal/process/task_queues:82:21)","config":{"transitional":{"silentJSONParsing":true,"forcedJSONParsing":true,"clarifyTimeoutError":false},"adapter":["xhr","http"],"transformRequest":[null],"transformResponse":[null],"timeout":0,"xsrfCookieName":"XSRF-TOKEN","xsrfHeaderName":"X-XSRF-TOKEN","maxContentLength":-1,"maxBodyLength":-1,"env":{},"headers":{"Accept":"application/json, text/plain, */*","Content-Type":"multipart/form-data; boundary=axios-1.6.8-boundary-iyNmIcW5IRiJzxiLTH-Uwcmmb","cookie":"session=undefined","User-Agent":"axios/1.6.8","Content-Length":"155","Accept-Encoding":"gzip, compress, deflate, br"},"baseURL":"http://127.0.0.1:31577/api","paramsSerializer":{},"url":"/private/tasks","method":"post","responseType":"json","data":{}},"code":"ERR_BAD_REQUEST","status":401}
❯ tests/api/apiClient.ts:34:46
❯ Axios.request node_modules/axios/lib/core/Axios.js:40:14
❯ Object.json node_modules/@aspida/axios/index.ts:27:12
❯ tests/api/private/tasks.test.ts:45:16
❯ Axios.request node_modules/axios/lib/core/Axios.js:45:41
❯ Object.json node_modules/@aspida/axios/index.ts:27:12
❯ tests/api/private/tasks.test.ts:45:16
|
tests/api/private/tasks.test.ts > DELETE: http://127.0.0.1:31577/api/private/tasks/_taskId:
server/tests/api/apiClient.ts#L34
Error: {"message":"Request failed with status code 401","name":"AxiosError","stack":"AxiosError: Request failed with status code 401\n at settle (file:///home/runner/work/next-frourio-starter/next-frourio-starter/server/node_modules/axios/lib/core/settle.js:19:12)\n at IncomingMessage.handleStreamEnd (file:///home/runner/work/next-frourio-starter/next-frourio-starter/server/node_modules/axios/lib/adapters/http.js:589:11)\n at IncomingMessage.emit (node:events:531:35)\n at endReadableNT (node:internal/streams/readable:1696:12)\n at processTicksAndRejections (node:internal/process/task_queues:82:21)","config":{"transitional":{"silentJSONParsing":true,"forcedJSONParsing":true,"clarifyTimeoutError":false},"adapter":["xhr","http"],"transformRequest":[null],"transformResponse":[null],"timeout":0,"xsrfCookieName":"XSRF-TOKEN","xsrfHeaderName":"X-XSRF-TOKEN","maxContentLength":-1,"maxBodyLength":-1,"env":{},"headers":{"Accept":"application/json, text/plain, */*","Content-Type":"multipart/form-data; boundary=axios-1.6.8-boundary-YW-_q68kMq4jsJWurKFn4bdCU","cookie":"session=undefined","User-Agent":"axios/1.6.8","Content-Length":"155","Accept-Encoding":"gzip, compress, deflate, br"},"baseURL":"http://127.0.0.1:31577/api","paramsSerializer":{},"url":"/private/tasks","method":"post","responseType":"json","data":{}},"code":"ERR_BAD_REQUEST","status":401}
❯ tests/api/apiClient.ts:34:46
❯ Axios.request node_modules/axios/lib/core/Axios.js:40:14
❯ Object.json node_modules/@aspida/axios/index.ts:27:12
❯ tests/api/private/tasks.test.ts:55:16
❯ Axios.request node_modules/axios/lib/core/Axios.js:45:41
❯ Object.json node_modules/@aspida/axios/index.ts:27:12
❯ tests/api/private/tasks.test.ts:55:16
|
Test
Process completed with exit code 1.
|
Test
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, actions/setup-node@v3, actions/cache@v2. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
Test
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/cache@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|