Refactor useCheckUrl hook #402
Closed
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.
In order to support pre-authorized_code flow I need to extend the code quite a bit (see https://github.com/wwWallet/wallet-frontend/pull/375/files#diff-c903fe0b0494b98415d2f768669e30bce989f793efa8de228deb83308a3affe6R47-R127). There exists some highly encapsulated logic for the authorization code flow in the
useCheckUrlhook. Adding the pre-authorized_code flow implementation to this hook would reduce the code quality. In fact, the current credential offer processing logic may need to be restructured to elegantly support both flows. Therefore, I have isolated the credential offer processing into its own component. I have also abstracted out other components that were managed from the top-levelAppcomponent via theuseCheckUrlhook, which should reduce the superfluous re-renders of the app and its component considerably.