no branches

This commit is contained in:
2024-01-10 02:27:20 +01:00
parent 31a3758bbe
commit 9d82dea4e1

View File

@@ -19,7 +19,7 @@ app.get('/', (req, res) => {
app.get('/authorize', (req, res) => { app.get('/authorize', (req, res) => {
const authorizationUrl = 'https://osu.ppy.sh/oauth/authorize'; const authorizationUrl = 'https://osu.ppy.sh/oauth/authorize';
const redirectUri = `http://localhost:${port}/callback`; const redirectUri = `https://${process.env.VERCEL_URL}/callback`;
const client_id = process.env.CLIENT_ID; const client_id = process.env.CLIENT_ID;
const response_type = 'code'; const response_type = 'code';
const scope = 'public identify'; const scope = 'public identify';
@@ -39,7 +39,7 @@ app.get('/callback', async (req, res) => {
'client_secret': process.env.CLIENT_SECRET, 'client_secret': process.env.CLIENT_SECRET,
'code': authorizationCode, 'code': authorizationCode,
'grant_type': 'authorization_code', 'grant_type': 'authorization_code',
'redirect_uri': `https://${process.env.VERCEL_BRANCH_URL}/callback` 'redirect_uri': `https://${process.env.VERCEL_URL}/callback`
}); });
fetch(tokenEndpoint, { fetch(tokenEndpoint, {