How to connect sanity with repl

how i make it work?

I have been trying to connect sanity with command like these:

npm install -g @sanity/cli
sanity init

I get redirected to this link to connect to google:

Please open a browser at https://api.sanity.io/v1/auth/login/google?type=token&label=65988b4fbbab+%2F+Linux&origin=http%3A%2F%2Flocalhost%3A4321%2Fcallback

now I tried url like https://your-repl-name--donabiswas1.repl.co/api.sanity.io/v1/auth/login/google?type=token&label=65988b4fbbab+%2F+Linux&origin=http%3A%2F%2Flocalhost%3A4321%2Fcallback

neither going to browser link directly is working. I end up with 404 error.

It’s not

it’s

exactly like it is.

Also, I noticed that the URL is https://localhost:4321, this is your computer’s URL and you cannot connect it with Replit, so that might be the problem.

2 Likes

how do i connect sanity with mt replt

i making next.js project, so I am installing sanity. my commands are:

npm -g @sanity/cli
sanity init

its giving me error with proxy and firewall probelm.

suggested error :

**localhost** refused to connect.

Try:

* Checking the connection
* [Checking the proxy and the firewall](chrome-error://chromewebdata/#buttons)

ERR_CONNECTION_REFUSED

its not solving with whatever is suggested because its issue with project made being virtual ide and sanity wanting to connect with computer localhost. the localhost:3000 doesnt even generally works so i opt for ‘replt-name.donabiswas1.repl.co

the login option givin are sanity is either google , github or sanity itself.
how to connect this with virtual project