Skip to content

Commit

Permalink
5505 forgot password feature broken (twentyhq#5602)
Browse files Browse the repository at this point in the history
- add missing `excludedOperations` in
`packages/twenty-server/src/engine/middlewares/graphql-hydrate-request-from-token.middleware.ts`
- update generated graphql file
- Add missing redirection to index after password update
  • Loading branch information
martmull authored May 27, 2024
1 parent 113dfba commit 2f52e0f
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 11 deletions.
20 changes: 10 additions & 10 deletions packages/twenty-front/src/generated/graphql.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,14 @@ export type DeleteOneObjectInput = {
id: Scalars['UUID'];
};

/** Schema update on a table */
export enum DistantTableUpdate {
ColumnsAdded = 'COLUMNS_ADDED',
ColumnsDeleted = 'COLUMNS_DELETED',
ColumnsTypeChanged = 'COLUMNS_TYPE_CHANGED',
TableDeleted = 'TABLE_DELETED'
}

export type EmailPasswordResetLink = {
__typename?: 'EmailPasswordResetLink';
/** Boolean that confirms query was dispatched */
Expand Down Expand Up @@ -585,7 +593,7 @@ export type RemoteTable = {
id?: Maybe<Scalars['UUID']>;
name: Scalars['String'];
schema?: Maybe<Scalars['String']>;
schemaPendingUpdates?: Maybe<Array<TableUpdate>>;
schemaPendingUpdates?: Maybe<Array<DistantTableUpdate>>;
status: RemoteTableStatus;
};

Expand Down Expand Up @@ -625,14 +633,6 @@ export type Support = {
supportFrontChatId?: Maybe<Scalars['String']>;
};

/** Schema update on a table */
export enum TableUpdate {
ColumnsAdded = 'COLUMNS_ADDED',
ColumnsDeleted = 'COLUMNS_DELETED',
ColumnsTypeChanged = 'COLUMNS_TYPE_CHANGED',
TableDeleted = 'TABLE_DELETED'
}

export type Telemetry = {
__typename?: 'Telemetry';
anonymizationEnabled: Scalars['Boolean'];
Expand Down Expand Up @@ -2095,7 +2095,7 @@ export type CheckUserExistsQueryHookResult = ReturnType<typeof useCheckUserExist
export type CheckUserExistsLazyQueryHookResult = ReturnType<typeof useCheckUserExistsLazyQuery>;
export type CheckUserExistsQueryResult = Apollo.QueryResult<CheckUserExistsQuery, CheckUserExistsQueryVariables>;
export const ValidatePasswordResetTokenDocument = gql`
query validatePasswordResetToken($token: String!) {
query ValidatePasswordResetToken($token: String!) {
validatePasswordResetToken(passwordResetToken: $token) {
id
email
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { gql } from '@apollo/client';

export const VALIDATE_PASSWORD_RESET_TOKEN = gql`
query validatePasswordResetToken($token: String!) {
query ValidatePasswordResetToken($token: String!) {
validatePasswordResetToken(passwordResetToken: $token) {
id
email
Expand Down
1 change: 1 addition & 0 deletions packages/twenty-front/src/pages/auth/PasswordReset.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ export const PasswordReset = () => {
}

await signInWithCredentials(email || '', formData.newPassword);
navigate(AppPath.Index);
} catch (err) {
logError(err);
enqueueSnackBar(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ export class GraphQLHydrateRequestFromTokenMiddleware
'Verify',
'SignUp',
'RenewToken',
'EmailPasswordResetLink',
'ValidatePasswordResetToken',
'UpdatePasswordViaResetToken',
'IntrospectionQuery',
'ExchangeAuthorizationCode',
];
Expand Down

0 comments on commit 2f52e0f

Please sign in to comment.