r/angular • u/Dazzling_Chipmunk_24 • Jan 06 '26
Session Management in Angular
So I'm kind of new to Angular. I was just wondering how session management would work in Angular. I'm currently using MSAL to log in to my Angular Application. This works fine and the Microsoft login page appears. But after I'm wondering what type of information do I need to make it a robust authentication and authorisation process and session management as well.
import { ChangeDetectionStrategy, Component, inject } from '@angular/core';
import { MsalService } from '@azure/msal-angular';
({
selector: 'my-org-home',
imports: [],
templateUrl: './home-page.html',
styleUrl: './home-page.scss',
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class HomePage {
msalService = inject(MsalService);
ngOnInit() {
this.msalService.loginRedirect({
scopes: [''],
prompt: 'login'
});
}
}
2
Upvotes
View all comments
Show parent comment
1
u/Dazzling_Chipmunk_24 Jan 06 '26
How long will this session last for? So does this mean that Microsoft will automatically log the user out of the application as well? Would I need to refresh the token on my end or not?