Hi @sinko,
I’ve done a bit more research on the Angular-specific implementation of this, and the Auth0 Angular SDK can actually handle this a bit easier than what I have described above (I removed the code examples to avoid any confusion).
For the loginWithRedirect
function you can pass target
in the appState
so that the app will redirect to any page after login. I’ve tested this out on the Quickstart:
// src/app/components/nav-bar/nav-bar.component.ts
loginWithRedirect() {
this.auth.loginWithRedirect({appState: {
target: window.location.pathname
}});
}