Skip to content
This repository was archived by the owner on May 15, 2024. It is now read-only.
This repository was archived by the owner on May 15, 2024. It is now read-only.

WebAuthenticator iOS - Sign out does not delete the cookies and we are unable to sign in as a different user #1712

@JRallee

Description

@JRallee

Description

Using WebAuthenticator for app sign in/out. Even after successful sign out, cookies aren't cleared and next time sign in logs in without prompting for user details.

Expected Behavior

After sign out, when the user tries to sign in again, it should open the page which accepts user id (ex. Azure Active directory login page)

Actual Behavior

App just signs in with the previous user. Unable to really switch users.

Basic Information

Only workaround to achieve it is,
Settings --> Safari --> Clear History and development data

###Note - Android seems to be working fine.

Tried below option, but no cookies are found
authContext.TokenCache.Clear();
var cookieStorage = Foundation.NSHttpCookieStorage.SharedStorage;
foreach (var cookie in cookieStorage.Cookies)
{
cookieStorage.DeleteCookie(cookie);
}

Have gone through other similar issues in this repo like,
#1223
https://github.com/MicrosoftDocs/xamarin-docs/issues/2814

but unable to find a concrete solution.

Any suggestions/solutions would be of great help

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions