We're sorry... Unexpected error when authenticating with identity provider

Hello,

I am attempting to migrate Keycloak from version 15 to version 25. While I can access the Keycloak GUI with my admin account without any issues, I encounter a problem when trying to log in to the application using users email. The error message displayed is “We’re sorry… Unexpected error when authenticating with identity provider.” I have tried various solutions found on Google, but none have been helpful. Any suggestions to resolve this issue would be greatly appreciated.

Thanks in advance!!!

What type of identity provider do you use? SAML or OpenID Connect? Do you have any error logs/events, stack traces, …?

Hello,

OpenID Connect. That the issue no logs!!!

When migrating from KC22 to KC23 I had such an issue with brokered SAML logins because of a change in the quarkus framework’s default behaviour. Creating a conf/quarkus.properties file and putting

quarkus.http.limits.max-form-attribute-size=2M

in it helped. But it was SAML where form post requests with many data is usual. As you are using OIDC I’m not sure it helps…

Thanks a lot! It’s not beneficial in my case.

You could open an issue here:

with precise description what’s you setup and the situation when the error occurrs.

Thank you for your support!!!

My suggestion is to have linear approach, to update from 15 to 16 then form 16 to 17 and so on …
Then you can follow Keycloak guideline:
https://www.keycloak.org/docs/latest/upgrading/index.html#migrating-to-16-0-0