Generate Magic login URL for Micropub endpoints
To make Micropub requests, the specification requires a Bearer token. Many current Micropub clients force the user to go through IndieAuth to obtain this, which means you need to have the required authorization and token endpoints set-up before getting started with Micropub.
token-provider.php implements the happy path for the IndieAuth dance resulting in providing the Micropub client with whatever token the user has provided.
raziellight on IRC was trying to get the Micropub client Omnibear to work, and that required him to figure out how to set-up IndieAuth from scratch. I think this is way too big of an investment for getting started with Micropub. It was time to cut out the middle man (or protocol, in this case).
How to use
- Put the
token-provider.phpfile on a webserver with PHP support. It has to be accessible over HTTP.
- Visit the URL for
token-provider.phpin a web browser.
- Fill the form with the URL for your Micropub endpoint (this is where clients will end up submitting data to) and the token value (this will be sent as Authorization by clients).
- Submit the form to get the final URL. The final URL can be copied from the browser’s URL field, or from a new form field that shows on the page.
- Use this Magic URL in your Micropub client.
token-provider.php are released under the Free Public Licence 1.0.0.