@nightnetwork/night-auth 1.0.2 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,10 +2,8 @@
2
2
  <html>
3
3
 
4
4
  <head>
5
- <link href="https://fonts.cdnfonts.com/css/onest" rel="stylesheet" />
6
- <link rel="stylesheet" href="nightloginflow.css" />
7
- <script src="./night-login-frame.umd.js"></script>
8
- <script src="./night-login.umd.js"></script>
5
+ <script src="./night-login.cdn.js"></script>
6
+ <link rel="stylesheet" href="night-login.css" />
9
7
  </head>
10
8
 
11
9
  <body>
@@ -13,23 +11,21 @@
13
11
  <div id="trigger"></div>
14
12
  <div id="root"></div>
15
13
  <script>
16
- // Wait until both bundles are loaded and then normalize NightLoginFrame
14
+ // Wait until the bundle is loaded
17
15
  (function waitForLibs() {
18
- if (typeof NightLogin === 'undefined' || typeof NightLoginFrame === 'undefined') {
16
+ if (typeof NightLogin === 'undefined') {
19
17
  return setTimeout(waitForLibs, 50);
20
18
  }
21
19
 
22
-
23
-
24
20
  const nightLogin = new NightLogin({
25
21
  service: 'DayDreamX',
26
22
  theme: 'system',
27
-
28
23
  backdropBlur: '8px',
29
24
  onSuccess: (token) => {
30
25
  console.log('token ', token);
31
26
  },
32
27
  API_URL: "https://jwtauth-srv-api.night-x.com",
28
+ assetUrl: "https://assets.night-x.com",
33
29
  onCancel: () => {
34
30
  console.log('Login cancelled');
35
31
  }