Auth0 Home Blog Docs

Getting error "no query params" during redirection after successful login

I have an Angular 8 SPA app using auth0-spa-js and I’m getting the following error during redirection after successful login. The redirect works, I’m just concerned if I want to pass parameters on the redirect there will be an issue. Anyone seen something similar?

core.js:7187 ERROR Error: There are no query params available at window.location.search.
at e. (auth0-spa-js.production.js:1)
at auth0-spa-js.production.js:1
at Object.next (auth0-spa-js.production.js:1)
at auth0-spa-js.production.js:1
at new ZoneAwarePromise (zone-evergreen.js:876)
at n (auth0-spa-js.production.js:1)
at e.handleRedirectCallback (auth0-spa-js.production.js:1)
at MergeMapSubscriber.project (auth.service.ts:31)
at MergeMapSubscriber._tryNext (mergeMap.js:46)
at MergeMapSubscriber._next (mergeMap.js:36)
defaultErrorLogger @ core.js:7187
handleError @ core.js:7239
handleError @ error-handler.service.ts:38
next @ core.js:31602
schedulerFn @ core.js:27834
__tryOrUnsub @ Subscriber.js:183
next @ Subscriber.js:122
_next @ Subscriber.js:72
next @ Subscriber.js:49
next @ Subject.js:39
emit @ core.js:27796
(anonymous) @ core.js:30931
invoke @ zone-evergreen.js:359
run @ zone-evergreen.js:124
runOutsideAngular @ core.js:30818
onHandleError @ core.js:30928
handleError @ zone-evergreen.js:363
runTask @ zone-evergreen.js:171
invokeTask @ zone-evergreen.js:465
ZoneTask.invoke @ zone-evergreen.js:454
timer @ zone-evergreen.js:2650
setTimeout (async)
scheduleTask @ zone-evergreen.js:2671
scheduleTask @ zone-evergreen.js:378
onScheduleTask @ zone-evergreen.js:272
scheduleTask @ zone-evergreen.js:372
scheduleTask @ zone-evergreen.js:211
scheduleMacroTask @ zone-evergreen.js:234
scheduleMacroTaskWithCurrentZone @ zone-evergreen.js:1107
(anonymous) @ zone-evergreen.js:2686
proto. @ zone-evergreen.js:1428
hostReportError @ hostReportError.js:2
error @ Subscriber.js:156
_error @ Subscriber.js:75
error @ Subscriber.js:55
_error @ Subscriber.js:75
error @ Subscriber.js:55
_error @ tap.js:56
error @ Subscriber.js:55
notifyError @ OuterSubscriber.js:7
_error @ InnerSubscriber.js:14
error @ Subscriber.js:55
notifyError @ OuterSubscriber.js:7
_error @ InnerSubscriber.js:14
error @ Subscriber.js:55
(anonymous) @ subscribeToPromise.js:8
invoke @ zone-evergreen.js:359
onInvoke @ core.js:30892
invoke @ zone-evergreen.js:358
run @ zone-evergreen.js:124
(anonymous) @ zone-evergreen.js:855
invokeTask @ zone-evergreen.js:391
onInvokeTask @ core.js:30873
invokeTask @ zone-evergreen.js:390
runTask @ zone-evergreen.js:168
drainMicroTaskQueue @ zone-evergreen.js:559
Promise.then (async)
scheduleMicroTask @ zone-evergreen.js:542
scheduleTask @ zone-evergreen.js:381
onScheduleTask @ zone-evergreen.js:272
scheduleTask @ zone-evergreen.js:372
scheduleTask @ zone-evergreen.js:211
scheduleMicroTask @ zone-evergreen.js:231
scheduleResolveOrReject @ zone-evergreen.js:845
resolvePromise @ zone-evergreen.js:791
(anonymous) @ zone-evergreen.js:707
webpackJsonpCallback @ bootstrap:25
(anonymous) @ views-dashboard-dashboard-module.js:1
Show 25 more frames

Figured out the issue. Had 2 different views calling handleAuthCallback and the 2nd call caused the problem