The most common and likely reasons for encountering an "OAuth login failed: An unexpected error occurred. Please report this if the issue persists. (HTTP 500)" error in Airbyte are: 1.
Invalid or Missing Credentials - If the Client ID or Client Secret is incorrect, missing, or not properly configured, OAuth authentication will fail. This is especially relevant for self-managed Airbyte, where you must provide your own credentials. Double-check for typos or missing fields in the connector settings. - Example error: "Undefined parameter 'client_secret' necessary for the OAuth Flow." [Using OAuth to Connect](
https://docs.airbyte.com/platform/using-airbyte/oauth) [source-bing-ads OAuth login failed](
https://github.com/airbytehq/airbyte/issues/53651) 2.
Missing or Invalid Refresh Token - Some connectors require a refresh token to be present. If the refresh token is missing or invalid, you may see errors like "Missing 'refresh_token' in query params" or "refresh token was not issued to this client." [source-bing-ads OAuth login failed](
https://github.com/airbytehq/airbyte/issues/53651) [source-HubSpot Programmatic Config Flow Fails](
https://github.com/airbytehq/airbyte/issues/57001) 3.
Redirect URI Mismatch - The redirect URI registered with the third-party platform must exactly match the one used by Airbyte. A mismatch will cause OAuth to fail. [Using OAuth to Connect](
https://docs.airbyte.com/platform/using-airbyte/oauth) 4.
Connector or Platform Bugs / Incomplete OAuth Implementation - Some connectors may not have a complete or correct OAuth implementation, especially after platform upgrades or changes. For example, a connector may lack a required OAuth mapping or not expose necessary fields in the UI. [source-rd-station-marketing Cannot authenticate](
https://github.com/airbytehq/airbyte/issues/52684) 5.
Expired or Revoked Tokens - If the access or refresh token has expired or been revoked, authentication will fail. Reauthorizing the connector can resolve this. [Using OAuth to Connect](
https://docs.airbyte.com/platform/using-airbyte/oauth) 6.
Server-Side or Configuration Errors - Internal server errors (HTTP 500) can also be caused by misconfigurations, missing beans, or other backend issues in Airbyte itself, especially after upgrades or changes in deployment. [helm Authentication doesn't work with 1.5.5 version](
https://github.com/airbytehq/airbyte/issues/63274)
Troubleshooting Steps: - Double-check all credentials and configuration fields. - Ensure the redirect URI matches exactly. - Try reauthorizing the connector. - If the error persists after these checks, it may be a bug or a missing feature in the connector or platform version. If you continue to see HTTP 500 errors after verifying the above, it is recommended to check Airbyte's logs for more details and report the issue with as much context as possible.