Hey @Marcin_Kubica! Apologies for the misunderstanding and the late reply. I was assuming you were setting up a resource connection in Retool, not SSO for the instance itself.
It looks like there is actually a known issue with the documentation, thanks for bumping it here!
You'll need to add BASE_URL/oauthcallback in order to log in to Retool, however BASE_URL/oauth/user/oauthcallback and BASE_URL/oauth/oauthcallback are still needed for resource-level authentication. The first is for user-specific resource auth and the second is for shared credentials.
We'll try and get the docs fixed to reflect that information!