-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
docs: add cache explanation to Flutter Firebase Login Tutorial #4339
Conversation
docs: improve Flutter Firebase Login Tutorial with cache explanation (felangel#3941) - Added detailed explanation of the purpose and benefits of caching in the login flow. - Described the caching implementation, including mechanisms, strategies, and error handling. - Provided an overview of third-party packages used (firebase_auth, firebase_core) with usage and installation instructions. - Enhanced project structure explanations, including folder purposes and key file roles. - Improved Firebase setup instructions with step-by-step guidance for project configuration, platform-specific setup, and troubleshooting tips. - Ensured tutorial content is beginner-friendly and aligned with BLoC principles. Addresses felangel#3941. Makes the tutorial more accessible for developers new to Flutter, Firebase, or BLoC.
style: format Flutter Firebase Login tutorial with Prettier - Resolved code style issues in `src/content/docs/tutorials/flutter-firebase-login.mdx` using Prettier. - Ensured consistent formatting and adherence to the project's coding standards.
@felangel the documentation doesnt specifies using the" |
@felangel can you just check the pr once you get free ! thanks ! |
## Caching Implementation | ||
|
||
### Purpose of Caching | ||
|
||
The caching mechanism in this login flow provides several key benefits: | ||
|
||
- **Improved User Experience**: By caching the user's authentication state, we eliminate unnecessary sign-in prompts and provide seamless transitions between app sessions. | ||
- **Offline Support**: The cached authentication state allows the application to function even with intermittent internet connectivity. | ||
- **Performance Optimization**: Caching reduces authentication checks, improving app responsiveness. | ||
|
||
### Caching Details | ||
|
||
#### Caching Mechanism | ||
|
||
- Implementation using shared preferences for persistent storage | ||
- Secure storage of authentication tokens | ||
- User state management through local caching | ||
|
||
#### Caching Strategy | ||
|
||
- When cache is updated: After successful login, registration, and token refresh | ||
- When cache is read: App startup and authentication state checks | ||
- Cache invalidation rules and refresh policies | ||
|
||
#### Error Handling | ||
|
||
- Handling expired cached credentials | ||
- Cache corruption recovery | ||
- Fallback mechanisms for cache failures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this fits in with the rest of the tutorial and a lot of this information doesn't apply to the cache usage in this tutorial.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR but I don't think this addresses the original issue. I think we should close this PR and open a new one where we specifically focus on explaining the role of the cache in this tutorial (along with the relevant source code so folks can follow along).
sure i will make the necessary changes !! |
docs: improve Flutter Firebase Login Tutorial with cache explanation (#3941)
Status
READY
Breaking Changes
NO
Description
Addresses #3941. Makes the tutorial more accessible for developers new to Flutter, Firebase, or BLoC.
Type of Change