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

fix: auto login guard passes correct config id #2008

Merged
merged 1 commit into from
Sep 20, 2024

Conversation

timdeschryver
Copy link
Contributor

Closes #2007

This PR corrects the arguments that are passed to the functional guards.
The second argument is always the state.

Without the parameter the state was passed as config id where autoLoginPartialRoutesGuard was used.

I tested both guards within the standalone application and everything seems fine after this change.

One question that came to surface was if we should provide a better error message when there's something wrong with the config.
A quick-win that helps the developer is mentioning the config id in the error message.

For example, if an non-existing config id is used with autoLoginPartialRoutesGuardWithConfig the following error is thrown, which doesn't help the developer.

Error: Please provide a configuration before setting up the module

I can turn this question into an issue and/or PR if you'd like.

@FabianGosebrink FabianGosebrink merged commit b8e32c5 into damienbod:main Sep 20, 2024
9 checks passed
@timdeschryver timdeschryver deleted the fix/auto-login-guard branch September 20, 2024 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Regression
3 participants