Request a custom subdomain in the Remix button url params


#1

Glitch’s one-click “Remix” button is great. As a platform, we are using it to help our extension developers / partners to start building with our API as quickly as possible.

There is only one missing feature that is keeping us from having Glitch act as a one click extension environment: The Glitch URL.

Our OAuth2 API requires client-id, client secret and a callback URL. We can pass the first two via the remix button’s params. But the callback URL is the missing link, the last piece, the missing cornerstone in an otherwise complete triumvirate of one-click awesomeness!

A naive implementation would be to let me pass a subdomain as another param (which I tried, unsuccessfully). If it’s taken, proceed with random URL assignment, or fail with ugly error. The onus would be on the developer to generate a sufficiently random subdomain.

This might result in major increased virality for Glitch, too :chart_with_upwards_trend:


#2

This isn’t a promise that we’ll do this right away, but I would like to understand your use case a little better. The callback URL you need is a URL to the glitch project? So something like https://myproj.glitch.me/oauthcallback?

If you could request a project name as part of remixing, how does that solve the problem?


#3

Hey Tim, No problem. To reduce ambiguity, I’ll clarify how I’m using these terms…

  • Platform: An application upon which extensions are build (Slack, Alexa, Wunderlist, Trello, etc). The platform provides the “Remix With Glitch” link.
  • Extension: Ex Alexa skill, Slack bot, etc. This is what would get built with Glitch.

For a platform to provision OAuth keys for an extension, it needs to know the URL of the extension to ensure it doesn’t give an access code to the wrong site. (And yes, the callback URL would be the the URL of the Glitch project).

Requesting a sufficiently random project name (subdomain) would let a platform set up a one-click extension since it would specify the client_id, client_secret and callback URL of a new Glitch project. Since these 3 values would match in both extension + platform, an OAuth2 setup would work with no further configuration.

Does that help?


#4

Yes, thanks. That makes sense.


Can a platform programmatically get a user's Glitch URL?