How an MSAL mobile app interact with refresh tokens and AAD B2C Session?

Stefano Sapienti 85 Punti di reputazione
2025-01-02T18:34:08.4633333+00:00

Hi,

I'm integrating a Mobile app with B2C custom policies using MSAL with browser mode. I've a doubt on what is the expected behavior using the default values of tokens and session durations.

I left B2C session duration to 24h, access token to 1 hour, refresh token to 14 days.

What happens is that the mobile app keep on receiving a new token while the refresh token is valid so then it stays logged in for a few days but, as the B2C browser session expires after 24 hours, if the user tries to launch the edit profile policy the B2C requires the user to login.

It is correct? Theorically I don't want the user to relogin into the app after two or three days without using it, so the token based behavior works as expected, but, at the same time I should also expect that the profile edit should work without asking for login. Could someone clarify this to me? Thanks in advance.

Microsoft Q&A
Microsoft Q&A
Usare questo tag per condividere suggerimenti, richieste di funzionalità e bug con il team di domande e risposte Microsoft. Il team di domande e risposte Microsoft valuterà regolarmente i commenti e suggerimenti e fornirà aggiornamenti lungo il percorso.
76 domande
0 commenti Nessun commento
{count} voti

Risposta

Le risposte possono essere contrassegnate come risposte accettate dall'autore della domanda. Ciò consente agli utenti di sapere che la risposta ha risolto il problema dell'autore.