When trying to set up OAuth authentication against Artifactory, you may encounter the following error:
[ERROR] (o.a.a.o.OAuthHandler:335) - Error handling OAuth2 login: OAuth2 authentication server error: redirect_uri_mismatch
This means there's a URL mismatch between what's configured in the OAuth provider and how Artifactory expects it to be accessed.
This error typically occurs when the custom base URL does not match the URL you configured on the OAuth provider.
Artifactory expects to be accessed through well-defined URL without additional suffix, such as #home or /webapp/#/home. Thus, if the OAuth is GitHub and the homepage URL in GitHub is: https://myartifactory-address/artifactory/#home, then you should use a custom base URL in Artifactory: https://myartifactory-address/artifactory