OpenId Connect error

I’m trying to add OpenId Connect to our custom oauth2 provider. I’ve entered the required parameters (discovery endpoint, client, secret), and when I click on openid login button, it redirects to the login page. However after login and redirection (/signup/openid/complete), mattermost throws following error in the logs
“unsupported protocol scheme”
I tried to debug it but since openid connect is in enterprise version, I could not.

I’m trying this on localhost, so all connections are http (not https). I need to do this in localhost for now.

Does anybody know a solution to this problem?

Any help for making this debuggable in local machine is also appreciated.

Ok, that was because of a wrong openid configuration. The error message could be better.