Dec 14th - Learn how Tecovas roped in success with Sanity and Shopify 🤠

Can you add a Custom Login URL to the Studio?

3 replies
Last updated: Oct 6, 2021
Hi! I'm trying to specify a custom login URL to my sanity studio in the
config/@sanity/default-login.json
file, but I'm not sure how I can specify one for development and another for production. My setup looks like this:

{
  "providers": {
    "mode": "replace",
    "redirectOnSingle": true,
    "entries": [
      {
        "name": "custom-login",
        "title": "Custom login",
        "url": "<http://localhost:3000/api/auth/login>",
        "logo": "static/custom-logo.svg"
      }
    ]
  }
}
How do I replace
<http://localhost:3000>
with
<https://production.app.com>
when deploying to production?
Oct 4, 2021, 5:52 PM
🧵
Oct 5, 2021, 6:01 AM
I don’t think that’s possible unfortunately. But definitively worth a feature request, since it seems reasonable that you should be able to do this: https://github.com/sanity-io/sanity/issues/new?assignees=&amp;labels=&amp;template=feature_request.md&amp;title=
Oct 5, 2021, 12:45 PM

Sanity– build remarkable experiences at scale

Sanity is a modern headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Was this answer helpful?

Categorized in