Can you give a little more detail in what was wrong on the other end so people looking for this error might use this to fix their issues?
I’m one of those, authorizing discourse against mattermost and I’m a little stuck with a similar error:
Started GET "/auth/oauth2_basic/callback?code=<redacted>&state=<redacted>" for <IPv4> at 2020-02-07 13:07:46 +0000
(oauth2_basic) Setup endpoint detected, running now.
(oauth2_basic) Callback phase initiated.
(oauth2_basic) Authentication failure! invalid_credentials: OAuth2::Error,
Started GET "/auth/failure?message=invalid_credentials&origin=https%3A%2F%2F<discourse_FQDN>%2Flogin&strategy=oauth2_basic" for <IPv4> at 2020-02-07 13:07:47 +0000
Processing by Users::OmniauthCallbacksController#failure as HTML
Parameters: {"message"=>"invalid_credentials", "origin"=>"https://<discourse_FQDN>/login", "strategy"=>"oauth2_basic"}
not anymore, I´m afraid … we had a call with one of the eam guys, and during the call he had a big revelation about what he did wrong. The bad thing is, that he never told me exactly what that was
قد أتأخر عن المناقشة، لكنني واجهت مشكلة مماثلة مؤخرًا. في حالتي، حدثت المشكلة بعد تثبيت Discourse ودمجه مع تسجيل الدخول عبر Google. في البداية، سار كل شيء على ما يرام، لكنني لاحقًا حذفت القطرة الأصلية (مثيل الخادم) وأعدت تثبيت Discourse.
أثناء إعادة التثبيت، أعدت استخدام نفس بيانات اعتماد Google API للتكامل، مما أدى إلى ظهور رسالة الخطأ:
"عذرًا، حدث خطأ أثناء المصادقة على حسابك."
بعد بعض استكشاف الأخطاء وإصلاحها، أدركت أن المشكلة كانت مع بيانات الاعتماد المعاد استخدامها. لحل هذه المشكلة، قمت بإنشاء مجموعة جديدة من بيانات اعتماد Google API للتكامل. بمجرد تحديث التكوين ببيانات الاعتماد الجديدة هذه، بدأ كل شيء في العمل بشكل مثالي!