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.

What are best practices for logging out when using WebAuthenticator? #1223

@jeyoor

Description

@jeyoor

We are working on a mobile application that uses OAuth2/AppAuth to authorize access to some backend APIs.

Our understanding is that Xamarin.Essentials WebAuthenticator is the recommended replacement for Xamarin.Auth for our use case going forward.

When working with Xamarin.Auth, logging out would require sending the user's browser to a logout URL to clear the cookies. See, for example: xamarin/Xamarin.Auth#204

We could do something like opening the user's browser to our logout URL like this:

public class Logout
{
    public async Task<bool> OpenLogoutPage(Uri logoutUri)
    {
        return await Browser.OpenAsync(logoutUri, BrowserLaunchMode.SystemPreferred);
    }
}

From a user experience point of view, this can seem odd/jarring.

Is this still the required/recommended way to log out when using Xamarin.Essentials WebAuthenticator?

Thank you for your work on Xamarin.Essentials!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions