yange
March 20, 2023, 1:03am
1
hi follow below instruction to do sso for angular application
https://manage.auth0.com/dashboard/us/dev-ge2yk10tj71ab5mk/applications/ffYlzSabXH1cxJKlhuPJOpCWFz6gSdn4/quickstart
when we call this.auth.loginWithRedirect(); from login click()
I got below error.
ERROR Error: Uncaught (in promise): Error: NG04002: Cannot match any routes. URL Segment: ‘authorize’
Error: NG04002: Cannot match any routes. URL Segment: ‘authorize’
Hey there!
As it is a quickstart related issue the most effective way to handle that would be to raise a GitHub issue in the quickstart repo here:
Once you have a link to it make sure to share it here so we can ping the repo maintainers. Thank you!
1 Like
Hi team,
We are providing solutions/potential solutions to the most viewed topics. I’ve found a similar topic regarding the case in the description:
opened 10:24AM - 21 Jun 23 UTC
area: router
area: server
### Which @angular/* package(s) are the source of the bug?
router
### Is this … a regression?
Yes
### Description
When a url contains parentheses such as `localhost:4200/(1)`, the router will throw the error `Error: NG04002: Cannot match any routes.`
In an Angular Universal app I have, this causes the entire node process to crash (which is another issue....).
Some notes on what type of urls cause the issue:
- `/(1)` -> Cannot match any routes. URL Segment: '1'
- `/(foo)` -> Cannot match any routes. URL Segment: 'foo'
- `/(foo:bar)` -> Cannot match any routes. URL Segment: 'bar'
- `/(foo;bar)` -> Cannot match any routes. URL Segment: 'foo;bar='
- `/(foo?)` ->no error
- `/()` -> no error
- `/(foo` -> no error
- `/foo)` -> no error
### Please provide a link to a minimal reproduction of the bug
https://stackblitz.com/edit/angular-router-parentheses-issue?file=src%2Fmain.ts
### Please provide the exception or error you saw
```true
Error: Uncaught (in promise): Error: NG04002: Cannot match any routes. URL Segment: '1'
Error: NG04002: Cannot match any routes. URL Segment: '1'
at Recognizer.noMatchError (https://angular-router-parentheses-issue.stackblitz.io/turbo_modules/@angular/router@16.1.1/fesm2022/router.mjs:3713:16)
at eval (https://angular-router-parentheses-issue.stackblitz.io/turbo_modules/@angular/router@16.1.1/fesm2022/router.mjs:3728:28)
at eval (https://angular-router-parentheses-issue.stackblitz.io/turbo_modules/rxjs@7.8.1/dist/cjs/internal/operators/catchError.js:13:51)
at OperatorSubscriber._this._error (https://angular-router-parentheses-issue.stackblitz.io/turbo_modules/rxjs@7.8.1/dist/cjs/internal/operators/OperatorSubscriber.js:43:21)
at Subscriber.error (https://angular-router-parentheses-issue.stackblitz.io/turbo_modules/rxjs@7.8.1/dist/cjs/internal/Subscriber.js:60:18)
at Subscriber._error (https://angular-router-parentheses-issue.stackblitz.io/turbo_modules/rxjs@7.8.1/dist/cjs/internal/Subscriber.js:84:30)
at Subscriber.error (https://angular-router-parentheses-issue.stackblitz.io/turbo_modules/rxjs@7.8.1/dist/cjs/internal/Subscriber.js:60:18)
at Subscriber._error (https://angular-router-parentheses-issue.stackblitz.io/turbo_modules/rxjs@7.8.1/dist/cjs/internal/Subscriber.js:84:30)
at Subscriber.error (https://angular-router-parentheses-issue.stackblitz.io/turbo_modules/rxjs@7.8.1/dist/cjs/internal/Subscriber.js:60:18)
at Subscriber._error (https://angular-router-parentheses-issue.stackblitz.io/turbo_modules/rxjs@7.8.1/dist/cjs/internal/Subscriber.js:84:30)
```
```
### Please provide the environment you discovered this bug in (run `ng version`)
```true
Angular core, route @ 16.1.1
```
### Anything else?
_No response_
Let me know if that helps with the question.
Thanks
Dawid
system
Closed
May 30, 2024, 6:50pm
4
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.