Windows Neo4j Desktop: credential error for WSL flask app (but browser's fine)

Hi, I've installed and used Neo4j & Neo4j Desktop on both Mac and Linux, and thought I new what I was doing.... but I'm a newbie when it comes to Windows. . ;-)

I got Neo4j Desktop installed (not using Docker, just the app), my graph DBMS server up and running, using default ports (default everything except for my password). I can connect in the browser to the localhost target and login using my username and password. Everything seems to be fine.

...except...

When I run my flask app in Windows via WSL and try to connect to the default bolt port bolt://localhost:7687 as I've done on Mac & Linux, I get a credential error on Windows. The logfile shows:

[bolt-2] The client is unauthorized due to authentication failure.

And the Traceback shows

neo4j.exceptions.ServiceUnavailable: Couldn't connect to localhost:7687 (reason [Errno 111] Connection refused)

My Python code has been tested & works fine on Mac & Linux, I'm using the correct username & password for this DMBS, and given that the server's running, and that I can authenticate via the web browser to the http port on Windows. I've already checked that my /etc/hosts file is normal and default-y in WSL.
...what else is left to check?
( I don't have anything fancy setup like a firewall or port remapping. This is nearly a fresh installation of Windows OS. )

I'm wondering:
Is there maybe something unique to Windows that one needs to do in System Settings?
Perhaps there's some (lack-of) interaction between regular-Windows and WSL I'm unaware of? [UPDATE: Spoiler: YES absolutely there is!]

I've been searching online for answers to deal with this, but haven't found anything , so, any suggestions would be appreciated. Thanks.

Update: Yea ok, apparently "localhost" on Windows != localhost on WSL.
Have tried a few ways to get the IP address of the Windows Neo4j instance that would be available via WSL and have tried a few different IP addresses thus obtained*, but no success yet -- flask app is still getting connection refused.

Interesting that error remains an authentication error, not a "no route to host" error.

*e.g., ip route show | grep -i default | awk '{ print $3}'

Also tried the "new Mirrored Mode" for Windows network connections, but... bolt://localhost:7687 is still refused in WSL.

SOLUTION:

So, ultimately, two things were sufficient to enable connection:

  1. My flask app using the IP address provided by that "ip route..." command shown above, so bolt://[that_ip_address]:7687. But that alone was insufficient. I also needed to...
  2. Modify the DBMS settings file to listen on all IP addresses anyway: server.default_listen_address=0.0.0.0.

Seems to me that either one of those alone should have been
sufficient, but whatever. I'm up and running now. Moving on.

(Note for future readers: I am in Mirrored Networking Mode now too. Not sure if that was necessary but I don't care.)