Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Clear cookies when using ASWebAuthenticationSession

How to clear cookies when using ASWebAuthenticationSession, the scenario is like, a different user can use the same device to login. If a user has already used it with SSO done, app is not insisting SSO for the new user.

So need to clear cookies.

Thanks in advance.

like image 292
ragul ml Avatar asked Dec 31 '25 04:12

ragul ml


1 Answers

Before calling session session.start() you need to set one specific property: session.prefersEphemeralWebBrowserSession = true.

It's will start clear session and will not set new cookies.

like image 144
Max Potapov Avatar answered Jan 03 '26 23:01

Max Potapov



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!