DmitrMakeev commited on
Commit
24b02bb
·
verified ·
1 Parent(s): 3fb2393

Update pages.html

Browse files
Files changed (1) hide show
  1. pages.html +50 -0
pages.html CHANGED
@@ -912,6 +912,56 @@ z-index: 1000; /* Убедитесь, что кнопка находится п
912
 
913
  </head>
914
  <body>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
915
  <script>
916
  vkBridge.send('VKWebAppInit');
917
  </script>
 
912
 
913
  </head>
914
  <body>
915
+
916
+
917
+ <div>
918
+ <script src="https://unpkg.com/@vkid/sdk@<3.0.0/dist-sdk/umd/index.js"></script>
919
+ <script type="text/javascript">
920
+ if ("VKIDSDK" in window) {
921
+ const VKID = window.VKIDSDK;
922
+
923
+ VKID.Config.init({
924
+ "app": 52295022,
925
+ "redirectUrl": "https://diamonik7777-up-fail.hf.space/monitor",
926
+ "source": VKID.ConfigSource.LOWCODE,
927
+ });
928
+
929
+ const oAuth = new VKID.OAuthList();
930
+
931
+ oAuth.render({
932
+ "container": document.currentScript.parentElement,
933
+ "oauthList": [
934
+ "vkid",
935
+ "ok_ru",
936
+ "mail_ru"
937
+ ]
938
+ })
939
+ .on(VKID.WidgetEvents.ERROR, vkidOnError)
940
+ .on(VKID.OAuthListInternalEvents.LOGIN_SUCCESS, function (payload) {
941
+ const code = payload.code;
942
+ const deviceId = payload.device_id;
943
+
944
+ VKID.Auth.exchangeCode(code, deviceId)
945
+ .then(vkidOnSuccess)
946
+ .catch(vkidOnError);
947
+ });
948
+ }
949
+
950
+ function vkidOnSuccess(data) {
951
+ // Обработка полученного результата
952
+ }
953
+
954
+ function vkidOnError(error) {
955
+ // Обработка ошибки
956
+ }
957
+ </script>
958
+ </div>
959
+
960
+
961
+
962
+
963
+
964
+
965
  <script>
966
  vkBridge.send('VKWebAppInit');
967
  </script>