-
Notifications
You must be signed in to change notification settings - Fork 13
Feature: Added useDirectusAuthHook for State-Based Authentication #364
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
Conversation
Does the README should be updated too to document the usage? |
I thought about updating the README, but I wanted your input in regards to #360 first. In case we adopt the automatic documentation generation the TSDoc string and add a link to the doc file in the README it would be sufficient. |
#360 seems big, I honestly don't know how TSDoc generation works. Would you mind add a few lines in the README, so we can merge this? Then we move to the next PR? 😄 |
No Problem. |
🔧 Types of changes
🚨 Checklist
Description
This pull request introduces a new feature,
useDirectusAuthHook
, which enables React state-based access to the current user and authentication state. The hook provides convenient methods for direct login and logout, utilizing the context-based states.The following changes have been made:
useDirectusAuthHook: The new hook has been implemented to manage user authentication state and user information, allowing easier and more flexible access to this data within the application.
Direct Login and Logout Methods: The hook includes direct login and logout methods that work seamlessly with the context-based states, simplifying the authentication process.
This feature enhances the overall user experience and provides developers with a more intuitive way to handle authentication within the application. Furthermore, it will seamlessly integrate with the authentication system of the components once it's introduced.
Please review the changes and provide feedback.
Thank you for considering this pull request, and I look forward to your valuable feedback!