diff options
author | Robin Krahl <robin.krahl@ireas.org> | 2019-01-19 20:30:58 +0100 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2019-01-20 09:53:01 -0500 |
commit | df21d45c34bfe2b890cc5386f417e193714dcf6a (patch) | |
tree | 45f5e0516e3dea87f84a3c19373c5c03d5787d45 | |
parent | b10263024d94973790578cf9622111523f1079e4 (diff) | |
download | sr.ht-docs-df21d45c34bfe2b890cc5386f417e193714dcf6a.tar.gz |
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.
-rw-r--r-- | installation.md | 26 |
1 files changed, 25 insertions, 1 deletions
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 |