Login problems office365 AADSTS50011

I’m having trouble logging in to an application Discourse that uses the Office365 login plugin.

AADSTS50011: The reply URL specified in the request does not match the reply URLs configured for the application: ‘309a2bc9-dbe3-4346-b4fe-2a348ca7d934’.

Request Id: 25814e60-934a-4d89-b671-8acbb02e8c00
Correlation Id: 9a1f4ffd-0b15-4d65-a86a-d3216bda0d00
Timestamp: 2021-01-25T06:59:58Z
Message: AADSTS50011: The reply URL specified in the request does not match the reply URLs configured for the application: ‘309a2bc9-dbe3-4346-b4fe-2a348ca7d934’.

Machine - bitnami
Discourse software

What could be the reasons for this error?

I found this topic and similar here, when I digging how to solve O365 authorization problem after moving server behind a proxy.

For those who will come to this topic from search, take into an account two points:

  1. Check if force_https option is enabled.
  2. If your Discourse is behind an SSL proxy, try the setting proxy_set_header X-Forwarded-Proto "https"; in Nginx config of your Discourse server.
Details

Facebook Login Error: CSRF detected - #3 by Ivan_Rapekas