How to access/login to neo4j browser from web application built on React

How to access Neo4j Browser url from a react application on a button click event which automatically logs in to the url by providing Connect URL, Username & Password

Thanks in advance.

1 Like

Look into the docs:

http://localhost:7474/db/data/

I don't believe we currently allow passing the credentials (insecurely) in a link to the browser.

@michael.hunger and i were just talking about this recently though. Do you know the current status?

Cheers,
-Ryan

Still I didn't find any solution,
My requirement is
On click of a button/hyperlink I need to open Neo4j browser url in a new tab and automatically login to the server/database by providing the following inputs Connect URL, Username & Password from react app.
@michael.hunger - Did you find any solution to the requirement.

@d.murali Doesn't this work for you?

http://user:password@localhost:7474/db/data/

No @ri8ika ,
My Browser url is something similar to http://11.222.333.444:5555/browser/
userName:neo4j,
password:xxxxxxx
I gave my user id and and password like
http://neo4j:xxxxxxx@l11.222.333.444:5555/browser/

it still landed to the page prompting for
Connect URL: like bolt://l11.222.333.444:8888
Username and Password

I have uploaded the sample screenshot for reference

Please try with port 7474 rather than 5555.

This did work with an older version of the browser, but I don't believe this capability still exists. I've asked internally to find out.

1 Like

Kindly update me once you get response on this from your internal team.

Hi there @d.murali,

Yes, it definitely exists! Something like the following should work for you:

http://11.222.333.444:5555/browser/?connectURL=bolt://neo4j:passw0rdz@11.222.333.444:8888

Note: if the credentials are valid, it'll authenticate the session. If they're invalid, no error is shown and they're not pre-filled in the form. I've given that feedback to the team

Also, obviously this has security concerns related to it, as the credentials in the query string could be logged by proxy servers and the web browser history, etc. So definitely don't use in an environment requiring high security.

Cheers,
-Ryan

2 Likes

Is there any way to encrypt the password and send in the url query string.
Or authenticate it from/using Javascript by changing the session/localstorage.

In my requirement I would be navigating to the neo4j browser url from a reactjs application,
it would be better If there is a provision of authenticating it from a Javascript file.

Answered in another thread. No, encryption would not work here unless you build a custom auth extension as the Neo4j Browser is a client-side application that needs the raw credentials to send to the Neo4j server.

Note: Browser is intended as a developer tool for those building applications with Neo4j.

@ryan.boyd
Hi I am trying to connect to neo4j through a node http proxy
the proxy is working fine and going to the neo4j login page when I used your url to pass username and password and hit the proxy there is no response it foes to the neo4j but I see a blank page
can I get assistance on this