-
Notifications
You must be signed in to change notification settings - Fork 433
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
Redirect after sign-in breaks with query parameters #1042
Comments
Hey, thanks for this. Did you try if the error is gone when you work with the QueryParamsHandling? |
I don't know what that is, but I'll investigate it.
…On Mon, 12 Apr 2021, 19:43 Fabian Gosebrink, ***@***.***> wrote:
Hey, thanks for this. Did you try if the error is gone when you work with
the QueryParamsHandling
<https://angular.io/api/router/QueryParamsHandling>?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1042 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACTDRUTRV4GJJDUVJXWIJ2TTIMWLXANCNFSM42ZUOVXQ>
.
|
You can configure how Angular handles the queryParams. So maybe this solves the issue. You can test it and please let us know. Thanks! |
@FabianGosebrink I looked into |
Describe the bug
I previously had custom code to pick up the
redirect
entry from storage and navigate to it. When I upgraded to 11.6.4, I had to take it out, because of thenavigate()
call on this line:angular-auth-oidc-client/projects/angular-auth-oidc-client/src/lib/check-auth.service.ts
Line 79 in 630f4e7
My own navigation failed (as expected) because the
redirect
entry no longer exists by the time my code executed.The new problem is that if the
redirect
entry contains any path with query parameters, navigation will fail. That's becausenavigate()
doesn't support query parameters as part of the commands array. Suppose I have a URL like/?p=1
, I will receive the following error:Changing that line to the following should work:
To Reproduce
Steps to reproduce the behavior:
Cannot match any routes
. Not expectedExpected behavior
Navigate to the redirect URL, whether it has query parameters or not.
Desktop (please complete the following information):
I'll be happy to make the change.
The text was updated successfully, but these errors were encountered: