ARTIFACTORY: How to Resolve “OAuth State Mismatch” When Using a Custom Domain and OAuth

Products
Frog_Artifactory
Content Type
Administration_Platform
AuthorFullName__c
Ron Mansharof
articleNumber
000006709
FirstPublishedDate
2025-12-09T13:19:03Z
lastModifiedDate
2025-12-09

ARTIFACTORY: How to Resolve “OAuth State Mismatch” When Using a Custom Domain and OAuth

Introduction 

When adding a custom domain to your instance, you may encounter the following error while trying to log in with an OAuth provider:

“OAuth state mismatch”

This error occurs because, when using a custom domain, Artifactory automatically redirects the request to the custom base URL after login, and the base URL does not store the state of the request.

Resolution 

To resolve this error, add the following property to the artifactory.system.properties file, located at: $JFROG_HOME/artifactory/var/etc/artifactory/artifactory.system.properties.

** After adding the property, restart Artifactory for the changes to take effect.

** If you are a cloud customer, please contact JFrog support for assistance with applying this property.
artifactory.oauth.redirect.prefer.custom.base.url=false