Mattermost versions 9.11.X <= 9.11.1, 9.5.x <= 9.5.9 icorrectly issues two sessions when using desktop SSO - one in the browser and one in desktop with incorrect settings.
Update Mattermost to versions 10.0.0, 9.11.2, 9.5.10 or higher.