Getting "Invalid state." error trying to sign in from MAUI app with Microsoft Account

I’ve been using Auth0 from a .NET MAUI app for about four months (I followed the instructions here: Add Authentication to .NET MAUI Apps with Auth0).

Suddenly today, when users try to sign in with Microsoft accounts, in IdentityModel.OidcClient.LoginResult from the OidcClient.LoginAsync() call, I’m getting the error “Invalid state.”. Logins using Google or email/password still work. I haven’t changed anything in my Auth0 configuration or deployed a new version of my app.

I tried to Unlink in Auth0 User Management to revoke my token, to no avail (I’m still not even prompted to sign in to my Microsoft Account). When I look at the logs in the Auth0 dashboard for my account I see “Successful login”.

Any ideas would be appreciated.

Regards,
Glen

FYI, I went to the Microsoft Account page to manage apps I’ve given access to (Sign in to your Microsoft account), removed access to my app, and tried signing in again and it worked. Not sure what caused the issue, but I will need to inform my users to do the same thing and hope it doesn’t happen again.

Glen

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.