From df21d45c34bfe2b890cc5386f417e193714dcf6a Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Sat, 19 Jan 2019 20:30:58 +0100 Subject: Document OAuth configuration in installation.md Configuring the OAuth client for the login using meta.sr.ht is required when setting up a new service, but it is currently not documented. This patch adds a new section to the installation guide that describes the OAuth configuration. --- installation.md | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/installation.md b/installation.md index 32783d6..2448eb7 100644 --- a/installation.md +++ b/installation.md @@ -169,7 +169,31 @@ an example for meta.sr.ht: } } -Once the proxy is configured, you should be able to log into your new service. +Once the proxy is configured, you should be able to access your new service. + +# OAuth configuration + +For services other than meta.sr.ht, you have to create and configure an OAuth +client before users can log into your service. To do that, visit your profile +on your meta.sr.ht instance, select the OAuth tab and register a new client. +Append the path `/oauth/callback` to the URL of your service instance and +choose this value as the base redirect URI (for example +`https://git.sr.ht/oauth/callback`). Update your configuration file with the +client ID and secret. + +Before you can use that OAuth client, you have to set it to preauthorized using +a database query, for example: + + $ psql meta.sr.ht + meta.sr.ht=# select client_id, client_name from public.oauthclient; + client_id | client_name + ------------------+------------- + 00061df177b1e089 | git + (1 row) + meta.sr.ht=# update public.oauthclient set preauthorized = true where id = 1; + UPDATE 1 + +Now you should be able to log into your new service. # Hacking on sr.ht -- cgit