Browser URL is changing when logging in after upgrade to v2

Our app uses @auth0/auth0-angular and authenticates via AuthGuard.

We are upgrading from 1.3.0 to 2.2.3

Initially when I attempted to login I was getting an error page, this was resolved by adding the following code:

authorizationParams: {
  redirect_uri: window.location.origin,
},

Now it is working but if I navigate to say localhost:4200/foo, the URL changes to localhost:4200 then localhost:4200/?code=UjFUC... then finally back to localhost:4200/foo.

With version 1.3.0 and no redirect_uri, the URL does not change at all.

Is this expected or is something wrong?