Static domain name for development on replit

Question: How can I get a static domain name (custom, or something like the old project.username.repl.co) for development with the new replit.dev system?

Repl link/Link to where the bug appears: N/A

Screenshots, links, or other helpful context: I am working on a project which needs to use Sign In With Google, but with the Google API for web I need to restrict the domain name of the redirect_uri which is the page it redirects the user back to after they have signed in. Previously this was fine because my repl would always use the same project.username.repl.co domain name so I could whitelist this domain name and redirect to it. However, as of the start of this month, replit has switched to replit.dev for development domain names and, along with this, the domain names now appear to be randomly generated (for example, b55f0bfe-592f-485d-9295-826b96b1e657-00-2b8bjlcimx324.worf.replit.dev) meaning I can’t whitelist it nor do I know what I could set the redirect_uri to. I am aware of production deployments, but I don’t want to need to create a production deployment in order to test every change I make (besides, it’s a “production deployment” for a reason!) and, of course, I also don’t want to need to pay (it is not a static site) when I am not needing 24/7 hosting. The only solution I can think of would be to create a proxy elsewhere which uses the repl.it API to get the generated domain name (if such an API endpoint exists) to redirect the user and handles Google requests on behalf of my repl. However, not only would that be a massive hassle, but I’m not wanting to hard-code my project for replit because I’m using another service for production deployment and I usually locally host this project but only need to use replit in school because I’m not able to host stuff via my school’s network. I’m aware replit allows for custom domains, but this seems to only be supported for production deployments and not for development. Is there some way I can still get a static domain name for development on replit?

2 Likes

You can deploy your site on an autoscale and attach a domain to it to use for logging in via Google.

As I mentioned, though, I don’t want to need to deploy every time I make a tiny change I want to test, to me that defeats the whole purpose of replit which is that I can make changes and get instant feedback. Also, it means I’d be needing to pay which of course I’d like to avoid haha

As far as I know, on the deployment tab you should have a button to restart the deployment. So when you make any change, you just need to click on this button.

If you want to use Replit, then paid deployment is the only option for you. You could look for other services.

So when you make any change, you just need to click on this button.

And wait for my app to start and then for the page to reload, which can take up to about 30 seconds. Of course, that is quite quick for deploying to production, but definitely not for development where I’m used to not even having to reload the page (for context, I use vite which implements HMR meaning it listens for file changes and instantly reflects the changes on the page). Sadly, even if it was free, this would not be a good developer experience. In fact, I don’t believe I’m even allowed to pay for anything involving this project because it is coursework. But, in school I’m pretty much stuck with using repl.it as my IDE so I’m really worried I just won’t be able to work on my coursework from in school anymore…