tangled
alpha
login
or
join now
oppi.li
/
plonkli
21
fork
atom
atproto pastebin service: https://plonk.li
21
fork
atom
overview
issues
pulls
pipelines
use plonk host
oppi.li
1 year ago
6e16ad2e
7d6403e4
+2
-2
1 changed file
expand all
collapse all
unified
split
src
auth
client.ts
+2
-2
src/auth/client.ts
···
5
5
6
6
export const createClient = async (db: Database) => {
7
7
const publicUrl = env.PLONK_PUBLIC_URL;
8
8
-
const url = publicUrl || `http://127.0.0.1:${env.PLONK_PORT}`;
8
8
+
const url = publicUrl || `http://${env.PLONK_HOST}:${env.PLONK_PORT}`;
9
9
const enc = encodeURIComponent;
10
10
return new NodeOAuthClient({
11
11
clientMetadata: {
12
12
client_name: "plonk.li",
13
13
client_id: publicUrl
14
14
? `${url}/client-metadata.json`
15
15
-
: `http://localhost?redirect_uri=${enc(`${url}/oauth/callback`)}&scope=${enc("atproto transition:generic")}`,
15
15
+
: `http://${env.PLONK_HOST}?redirect_uri=${enc(`${url}/oauth/callback`)}&scope=${enc("atproto transition:generic")}`,
16
16
client_uri: url,
17
17
redirect_uris: [`${url}/oauth/callback`],
18
18
scope: "atproto transition:generic",