Skip to content

Commit 8cb34d6

Browse files
committed
🚑️ Fix localhost oauth callback uri used in prod...
1 parent 6ae2e09 commit 8cb34d6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

scripts/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
set -xe
22

3-
VERSION=1.11.0
3+
VERSION=1.11.1
44

55
echo "{ \"version\": \"$VERSION\", \"commit\": \"$(git rev-parse HEAD)\" }" > ../public/version.json
66

src/lib/server/oauth.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { ChurrosClient } from '@inp-net/churros-client';
33
export const churros = new ChurrosClient({
44
client_id: process.env.PUBLIC_OAUTH_CLIENT_ID,
55
client_secret: process.env.OAUTH_CLIENT_SECRET,
6-
redirect_uri: 'http://localhost:5173/login/callback'
6+
redirect_uri: (process.env.NODE_ENV === "development" ? 'http://localhost:5173' : process.env.ORIGIN) + '/login/callback'
77
});
88

99
export async function login(code: string): Promise<string> {

0 commit comments

Comments
 (0)