Repository navigation
fix(auth): report a rejected refresh in signOut(scope: others) as expired - #2239
Conversation
…ired When the server rejected the refresh token, signOut signed the device out with SignOutReason.userInitiated for both the global and the others scope. The others scope does not ask to end this session, which ended because it expired, so it now reports SignOutReason.sessionExpired.
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
signOut(scope: SignOutScope.others)now signs the device out withSignOutReason.sessionExpiredinstead ofSignOutReason.userInitiatedwhen the server rejects the refresh token, as the sign_out and sign_out_reason specs require.SignOutScope.globalkeepsuserInitiated.Closes #2238
_refreshForSignOutpicks the reason from the scope. Only the reason changes: the device is still signed out, andsignOutstill throws anAuthSessionsNotRevokedException.signOutand the sign-out section of MIGRATION.md say which reason each scope reports.sign_out_scope_test.dartnow expectssessionExpiredand fails without the fix. The global-scope test still expectsuserInitiated.Summary by CodeRabbit
Documentation
Bug Fixes