Hello,
We have a problem since about 1 week. Just before a successful login, we are redirected to our Angular application with correct URI.
But, we have something like : https://www.ourapplication.fr/?code=4sI6m5oAn2HEm-iFkAoh5BGCpXWFCDJAMj-gGRCF8gOc2&state=M2RXSy45QWhJQllrOWI3WXQyTH5pSTZnVi1UX0dpY2NIY3U1eTF4VDZUag%3D%3D
The code should be deleted by the application to use https://www.ourapplication.fr. But it is not happening. We got :
main.6204581660d76a70.js:1 ERROR TypeError: this.router.navigateByUrl is not a function
at xy.navigateByUrl (main.6204581660d76a70.js:1:170744)
at Ki.selector (main.6204581660d76a70.js:1:173011)
at Ki.error (main.6204581660d76a70.js:1:2264556)
at Ki._error (main.6204581660d76a70.js:1:2249530)
at Ki.error (main.6204581660d76a70.js:1:2249323)
at fd._next (main.6204581660d76a70.js:1:2281046)
at fd.next (main.6204581660d76a70.js:1:2249263)
at _i._next (main.6204581660d76a70.js:1:2284050)
at _i.next (main.6204581660d76a70.js:1:2249263)
at main.6204581660d76a70.js:1:2291851
Error in console.
If we delete manually the code part of url, the application is working and the token is correctly set in cookies.
The code is sadly directly inside the Angular sdk. If I click to see where is the error I have :
const YT = new r.OlP("auth0-angular.config");
let eE = (()=>{
class xy {
constructor(e_, A_) {
this.location = e_;
try {
this.router = A_.get(pD.F0)
} catch (w0) {}
}
navigateByUrl(e_) {
this.router ? this.router.navigateByUrl(e_) : this.location.replaceState(e_)
}
}
return xy.\u0275fac = function(e_) {
return new (e_ || xy)(r.LFG(AM.Ye),r.LFG(r.zs3))
}
,
xy.\u0275prov = r.Yz7({
token: xy,
factory: xy.\u0275fac,
providedIn: "root"
}),
xy
}
With an error on navigateByUrl().
Do you have a solution for us?
PS : After more checks, it’s only the « state » part that is not working. If I remove it, the Angular application is correctly displayed.