Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.9.6 #92

Merged
merged 6 commits into from
Oct 27, 2024
Merged

v0.9.6 #92

merged 6 commits into from
Oct 27, 2024

Conversation

erayerdin
Copy link
Owner

No description provided.

* fix: Return useDeleteUser to ready state after error

Reason:
This change is implemented to correct an issue where 'useDeleteUser' would remain in the 'loading' state if an error occurred. Instead, it should return to the 'ready' state.

Changes:
Modified 'useDeleteUser.ts'. Added a try-catch block to detect if a 'FirebaseError' occurred during the deletion of the user. If such an error arises, the state is set to 'ready' and the error is thrown.

* fix: Set state to ready in case of sign-in error

To ensure that user interface does not hang or freeze when encountering an error during different signIn options, the state is now set to 'ready' when a 'catch' block is triggered.

Changes:
Added 'try-catch' block in SignIn method for different signIn types such as 'classic', 'link', 'google', 'facebook', 'apple', 'twitter', 'github', 'microsoft', 'yahoo' to handle potential errors. If an error is thrown, it sets the state to 'ready' before re-throwing the error.

* fix: set state to ready in case of an error

why:
To prevent the application from being stuck in 'loading' state when there is an error while sending email verification.

Changes:
1. Introduced a try-catch block in 'useSendEmailVerification'.
2. In case of an error, the state is now set to 'ready' instead of being stuck at 'loading'.
3. The error is then rethrown to be handled by the calling function.

* remove FirebaseError check

* fix: Set state to 'ready' in case of error during sign out

Why: There was a lack of error handling in our sign out operation. If an error occurred during sign out, the state was not being reset back to 'ready', leaving the system in a 'loading' state indefinitely.

Changes:
A try catch block was added to handle any errors occurring during the sign out process. If an error is caught, the state is now set to 'ready' before the error is re-thrown.

* fix: Set state to ready on sign up error

Why: To assure that the state is set back to 'ready' even when an error occurs during the sign up process, preventing the state from being stuck at 'loading'.

Changes:
Added a try/catch block around createUserWithEmailAndPassword in useSignUp.ts in order to catch any errors and set the state back to 'ready'.
* update firebase-tools

* remove useCallback and remove from dependency list
@erayerdin erayerdin added the type|bug Something isn't working label Oct 23, 2024
@erayerdin erayerdin self-assigned this Oct 23, 2024
@erayerdin erayerdin changed the title v0.9.7 v0.9.6 Oct 23, 2024
Copy link

codecov bot commented Oct 23, 2024

Codecov Report

Attention: Patch coverage is 24.34783% with 87 lines in your changes missing coverage. Please review.

Project coverage is 74.09%. Comparing base (8fec36a) to head (146e708).
Report is 28 commits behind head on main.

Files with missing lines Patch % Lines
src/auth/useSignIn.ts 11.68% 68 Missing ⚠️
src/auth/useSendEmailVerification.ts 0.00% 10 Missing ⚠️
src/auth/useDeleteUser.ts 62.50% 3 Missing ⚠️
src/auth/useSignOut.ts 57.14% 3 Missing ⚠️
src/auth/useSignUp.ts 75.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #92      +/-   ##
==========================================
- Coverage   76.41%   74.09%   -2.32%     
==========================================
  Files          47       47              
  Lines        1700     1764      +64     
  Branches      130      134       +4     
==========================================
+ Hits         1299     1307       +8     
- Misses        391      447      +56     
  Partials       10       10              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@erayerdin erayerdin merged commit 453014c into main Oct 27, 2024
8 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type|bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant