Feature: Added useDirectusAuthHook for State-Based Authentication#364
Merged
gremo merged 13 commits intogremo:mainfrom Jul 31, 2023
Merged
Feature: Added useDirectusAuthHook for State-Based Authentication#364gremo merged 13 commits intogremo:mainfrom
gremo merged 13 commits intogremo:mainfrom
Conversation
gremo
reviewed
Jul 30, 2023
gremo
reviewed
Jul 30, 2023
gremo
reviewed
Jul 30, 2023
gremo
reviewed
Jul 30, 2023
Owner
|
Does the README should be updated too to document the usage? |
Collaborator
Author
|
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. |
Owner
|
#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? 😄 |
Collaborator
Author
|
No Problem. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🔧 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!