Created
July 26, 2020 02:46
-
-
Save changhuixu/56e3d49398d92772da4b03bdfd7c73b9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function appInitializer(authService: AuthService) { | |
return () => | |
new Promise((resolve) => { | |
console.log('refresh token on app start up') | |
authService.refreshToken().subscribe().add(resolve); | |
}); | |
} |
Hi @Krzysztofz01 , thank you for pointing it out.
I have updated the solution to Angular v13.
Please check my Git repo for details.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This method won't work in Rxjs included in Angular 13. We can refactor the interceptor like this:
Also don't use:
This method is depracated and will be removed soon.