Skip to content
This repository was archived by the owner on Apr 13, 2025. It is now read-only.

Commit 7d2e833

Browse files
committed
Add text after succesfully youtube authentication
1 parent c329429 commit 7d2e833

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

nodecg-io-spotify/extension/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ class SpotifyService extends ServiceBundle<SpotifyServiceConfig, SpotifyServiceC
9595

9696
// This little snippet closes the oauth window after the connection was successful
9797
const callbackWebsite =
98-
"<http><head><script>window.close();</script></head><body>Spotify connection successful! You may close this window now.</body></http>";
98+
"<html><head><script>window.close();</script></head><body>Spotify connection successful! You may close this window now.</body></html>";
9999
res.send(callbackWebsite);
100100
});
101101

nodecg-io-youtube/extension/index.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,11 @@ class YoutubeService extends ServiceBundle<YoutubeServiceConfig, YoutubeServiceC
7171
router.get("/nodecg-io-youtube/oauth2callback", async (req, res) => {
7272
try {
7373
const params = req.query;
74-
res.end("<script>window.close()</script>");
74+
75+
const callbackWebsite =
76+
"<html><head><script>window.close();</script></head><body>YouTube connection successful! You may close this window now.</body></html>";
77+
res.send(callbackWebsite);
78+
7579
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
7680
const { tokens } = await auth.getToken(params.code!.toString());
7781
resolve(tokens);

0 commit comments

Comments
 (0)