Then you must have another location block where authentication isn't used or the backend is also still expecting authentication.
Check the logfiles, nginx and backend.
Check the logfiles, nginx and backend.