Repro steps:
1. Configure a Mattermost server with SAML (or use an existing one)
2. Log in with an email account
3. From account settings -> security, migrate your account to SAML
4. Enter current email account's password and hit enter
5. (skipped if already signed in) Enter credentials for SAML account
Observed: Migration fails after logging into SAML provider
Expected: Migration successful
Reproduces on community, community-release, community-daily.
Candidate for hotfix.
See description.
Tested on the following server versions and the issue is fixed:
5.19 release branch
5.18.1-rc1
5.17.3-rc1
5.16.5-rc1
5.9.8-rc1
No new tests needed. PR labelled. Closing.