getUser starts always with undefined in angular SKD 9

Hi there,
I followed the tutorial to set up authentication for angular 9. Now, I want to redirect to login page the user immediately if not logged, what I do is simply

export class AppComponent implements OnInit {

constructor(public auth: AuthService) {

ngOnInit(): void {
this.auth.getUser$().subscribe(© => {
console.log(‘result user getuser’ + c)
if (c == undefined)


The problem is that the first user that is streamed is always undefined, afterwards, if the user is actually logged, the real user is returned, causing the reload of the component and breaking my system.
Moreover, I noticed that reloading a page where I am authenticated in incognito mode, it causes the service to forget the authentication.
Any solutions? Thank you

Hey there!

Can you let us know what doc/ quickstart do you follow?

Hi Konrad, sure!

this one

I am also getting undefined for user.

Can you guys raise this as a GitHub issue in our Angular SDK GitHub repo so we can work on that directly with the repo maintainers and solve that hurdle most effectively? Thanks! Make sure to share link to the issue here in the thread.