forked from ndm13/plex-token-generator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
80 lines (80 loc) · 3.26 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Plex Token Generator</title>
<script type="module" src="https://unpkg.com/[email protected]/dist/ionicons/ionicons.esm.js"></script>
<script nomodule src="https://unpkg.com/[email protected]/dist/ionicons/ionicons.js"></script>
<link rel="stylesheet" href="./style.css"/>
<script src="./script.js"></script>
</head>
<body>
<header>
<h1>Plex Token Generator</h1>
</header>
<main>
<section>
<form>
<label for="product">Product Name</label>
<input required type="text" name="product" id="product"/>
<ion-icon title="The name that will show up in Plex" aria-label="Info"
name="information-circle-outline"></ion-icon>
<label for="client-id">Client ID</label>
<input required type="text" name="client-id" id="client-id"/>
<ion-icon title="The UUID that identifies your app" aria-label="Info"
name="information-circle-outline"></ion-icon>
<button id="random-id" aria-label="Random Client ID">
<ion-icon title="Generate a random client ID (use for single-purpose apps)" aria-label="Info"
name="shuffle-outline"></ion-icon>
</button>
<p>
<strong>Note:</strong> The generated token will have the same access permissions as your standard
account, so be careful!
</p>
<span class="buttons">
<button id="generate">Generate PIN</button>
<button id="cancel">Cancel</button>
</span>
</form>
</section>
<section>
<div id="infobox">
<h4>What is this?</h4>
<p>
This tool is designed to provide a simple way to create authentication tokens for Plex. It poses as an
app of your choosing (create a product name and client ID for it to use) and lets you pair this "app"
to your account, returning an auth token for you to use in scripts or projects.
</p>
<p>
For more information, check out the
<a href="https://github.com/ndm13/plex-token-generator">GitHub page</a>.
</p>
</div>
<div id="pin-container">
<h3>Your PIN is:</h3>
<kbd id="pin"></kbd>
<img alt="QR code"/>
<p>
Scan the QR code or go to <a target="_blank" href="https://plex.tv/link">plex.tv/link</a> to finish
token generation.
</p>
</div>
<div id="token-container">
<h3>Your Plex token is:</h3>
<kbd id="plex-token"></kbd>
<p>
This should last as long as the created app is linked. You can manage linked apps for your account
<a target="_blank" href="https://app.plex.tv/desktop/#!/settings/devices/all">here</a>.
</p>
</div>
</section>
</main>
<footer>
<p>
© 2023 ndm13; based on
<a target="_blank" href="https://forums.plex.tv/t/authenticating-with-plex/609370">this forum post</a>.
</p>
</footer>
</body>
</html>