mirror of
https://github.com/twentyhq/twenty.git
synced 2024-09-11 15:35:36 +03:00
A regression has been introduced in https://github.com/twentyhq/twenty/pull/6459/files#diff-0a06bf2b624f77f1b7ded0fcc4ce266d1a56f4329222b46d1cf4d76a18000c97L505 where 401 have been changed to 403. However the renew token logic on the FE expects a 401, see here https://github.com/twentyhq/twenty/blob/main/packages/twenty-front/src/modules/apollo/services/apollo.factory.ts#L100 I've also introduced a fix with a proxy class in GraphQLHydrateRequestFromTokenMiddleware since this middleware calls validateToken from tokenService which are never converted back to graphqlErrors so handleExceptionAndConvertToGraphQLError below will receive an AuthException and will send capture it and return it as a 500 both issues have been fixed and should resolve the renewToken logic ## Test tested locally by playing with token expiration dates in the env <img width="635" alt="Screenshot 2024-08-09 at 12 47 05" src="https://github.com/user-attachments/assets/e93d5741-29b7-4699-b882-ee8f4fee6e6e"> |
||
---|---|---|
.. | ||
@types | ||
patches | ||
scripts | ||
src | ||
test | ||
.env.example | ||
.env.test | ||
.eslintrc.cjs | ||
.gitignore | ||
.prettierignore | ||
.prettierrc | ||
.swcrc | ||
jest.config.ts | ||
nest-cli.json | ||
package.json | ||
project.json | ||
tsconfig.build.json | ||
tsconfig.json |