-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[686] - create code for refreshing google auth token (#690)
* feat: Add refresh_token to googleLogin response - Added the `refresh_token` property to the `googleLogin` response type in `responses.ts`. - This change allows the backend to include a refresh token when a user logs in with Google. Refactor: Remove unused code in useLogin.tsx - Removed an extra whitespace in the `useLogin` hook in `useLogin.tsx`. - This change improves code readability and removes unnecessary code. Refactor: Comment out unused code in useApiClient.tsx - Commented out the unused `useNavigate` import and `ROUTES` import in `useApiClient.tsx`. - This change removes unused code and improves code cleanliness. Refactor: Remove unused parameters in apiCall function - Removed the `customCookies` parameter from the `apiCall` function in `useApiClient.tsx`. - This change removes unused code and simplifies the function signature. Fix: Update getAllConversations request headers - Updated the request headers in the `getAllConversations` function in `useApiClient.tsx` to include the access token. - This change ensures that the request is authenticated and authorized. Fix: Handle token refresh in useApiClient.tsx - Added a new `handleTokenRefresh` function in `useApiClient.tsx` to handle token refresh logic. - This change allows the frontend to refresh the access token when it expires. Fix: Update postGoogleLogin to store refresh token - Updated the `postGoogleLogin` function in `useApiClient.tsx` to store the refresh token in cookies. - This change ensures that the refresh token is available for token refresh requests. Fix: Remove unused code in postRegister function - Removed an extra line of code in the `postRegister` function in `useApiClient.tsx`. - This change removes unnecessary code and improves code readability. * feat: Add authorization header to createConversationInvite and deleteConversation API calls * refactor: Remove unused code and console logs in useApiClient hook * refactor: Remove unused code and console logs in useApiClient hook * refactor: Remove unused code and console logs in useApiClient hook * cleanup --------- Co-authored-by: Svenstar74 <sven.firmbach@gmx.de>
- Loading branch information
1 parent
aa83176
commit a24c2ed
Showing
4 changed files
with
85 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters