Plugin Directory

Changeset 3377401


Ignore:
Timestamp:
10/13/2025 10:13:57 AM (5 months ago)
Author:
loymax
Message:

#251152 fixed Vkontakte autorization

Location:
loymaxapp/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • loymaxapp/trunk/loymax-app.php

    r3331161 r3377401  
    44 * Plugin Name: LoymaxWebApp
    55 * Description: Loymax loyalty program User Portal configuration.
    6  * Version: 3.5.6
     6 * Version: 3.5.7
    77 * Author URI:  https://loymax.ru/
    88 * Author: Loymax solutions
  • loymaxapp/trunk/public/app.min.js

    r3331161 r3377401  
    11/**
    2  * Loymax v3.5.20250721-.6 (http://loymax.ru)
     2 * Loymax v3.5.20251013-.7 (http://loymax.ru)
    33 * Copyright 2011-2025 Loymax, Inc.
    44 * License: MIT
     
    91539153"use strict";!function(e){e.module("lmxApp").directive("lmxShowcase",["$q","authService","modalService","routingService","showcaseService",function(e,o,n,t,c){return{restrict:"E",replace:!0,scope:!0,templateUrl:"app/directives/showcase/showcase.html",link:function(l){function r(){l.inProgress=!0,c.getCategories().then(function(o){var n=null,t=[];o.forEach(function(e){n=c.getCouponsByCategory(e.logicalName),n.then(function(o){o.length&&(l.couponsByCategories[e.logicalName]={name:e.name,coupons:o},l.coupons.pushArray(o))}),t.push(n)}),e.all(t)["finally"](function(){l.inProgress=!1})},function(){l.inProgress=!1})}l.categoriesType=!1,l.couponsByCategories={},l.coupons=[],l.selectedCategory=null,r(),l.goToLogin=function(){t.goToLogin(!0)},l.loggedIn=o.loggedIn(),l.openBuyCouponModal=function(e){n.open({size:"md",templateUrl:"app/directives/showcase/modal/buyCouponModal.html",controller:"buyCouponModalController",resolve:{coupon:e}}).result.then(r)},l.changeType=function(e){l.categoriesType=e,l.selectedCategory=null},l.showCategory=function(e){l.selectedCategory=e}}}}])}(angular);
    91549154"use strict";!function(e){e.module("lmxApp").directive("lmxSocial",["$http","$q","$window","configurationService","socialService",function(i,n,t,o,r){return{restrict:"E",replace:!0,scope:!0,templateUrl:"app/directives/social/social.html",link:function(i,c,a){function l(e){t.location.replace(r.getAuthorizeURL(e,i.clients,i.isBinding?"binding":"auth",h,d))}function s(e){i.isProgress.remove=!0,r.removeClient(e).then(function(){g()})["finally"](function(){i.isProgress.remove=!1})}function g(){r.getSocialIdentifiers().then(function(e){f=e})}function u(){r.getClients().then(function(e){i.clients=e})}i.isBinding=e.isDefined(a.isBinding),i.socialImagesPath=o.imagesPath?o.imagesPath+"social":"",i.isProgress={getSocialInfo:!0},i.isBinded=function(e){return f.contains(e.providerType)},i.toggleBind=function(e){(i.isBinded(e)?s:l)(e.providerType)},i.authHandler=function(e){i.isBinding||l(e.providerType)};var f=[];t.localStorage.codeVerifier=r.generateCodeVerifier();var d,h=r.generateState();r.generateCodeChallengeSync(t.localStorage.codeVerifier).then(function(e){d=e})["catch"](function(e){return console.error("Error:",e)}),n.all([u(),i.isBinding?g():null]).then(function(){i.isProgress.getSocialInfo=!1})}}}])}(angular);
    9155 "use strict";!function(e){e.module("lmxApp").factory("socialService",["$http","$window","configurationService","routingService",function(e,t,n,r){function o(){return e.get(p+"Social/Clients").then(function(e){return e.data})}function i(t,n,r,o,i,a){var c={},u="/Login";return"vkontaktenew"===t.toLowerCase()&&(t="VKontakte",c.code_verifier=r,c.device_id=o,i=i.replace("".concat(t,"new"),t)),c.code=n,c.redirect_uri=i,"binding"===a&&(u="/Set"),e.get(p+"User/"+t+u,{params:c}).then(function(e){return e.data})}function a(){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_-",t=Math.floor(10*Math.random())+32;return Array.from({length:t},function(){return e.charAt(Math.floor(Math.random()*e.length))}).join("")}function c(e){return window.btoa(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function u(){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_-",t=Math.floor(86*Math.random())+43;return Array.from({length:t},function(){return e.charAt(Math.floor(Math.random()*e.length))}).join("")}function d(e){return c(String.fromCharCode.apply(null,new Uint8Array(e)))}function l(e){var t=new TextEncoder,n=t.encode(e);return window.crypto.subtle.digest("SHA-256",n).then(function(e){return d(e)})}function h(t){return e.post(p+"User/"+t+"/Remove")}function f(){return e.get(p+"User/Logins").then(function(e){return e.data.socialIdentifiers.map(function(e){return e.provider})})}function g(e,n,o,i,a){var c=n.find(function(t){return t.providerType===e}),u="".concat(r.getLocationURL()).concat(t.location.pathname,"?providerType=").concat(e,"new&action=").concat(o);return"https://id.vk.com/authorize"===c.authorizeUri.target?(u="".concat(r.getLocationURL()).concat(t.location.pathname,"?providerType=").concat(e,"new&action=").concat(o),c.authorizeUri.target+(/[?&]/.test(c.authorizeUri.target)?"&":"?")+"response_type=code&client_id="+c.clientId+"&redirect_uri="+encodeURIComponent(u)+"&state="+i+"&code_challenge="+a+"&code_challenge_method=S256&scopes=vkid.personal_info,groups"):c.authorizeUri.target+(/[?&]/.test(c.authorizeUri.target)?"&":"?")+"client_id="+c.clientId+"&redirect_uri="+encodeURIComponent(u)+"&response_type=code"}var p=n.host+"v1.2/";return{getAuthorizeURL:g,getClients:o,getSocialIdentifiers:f,removeClient:h,generateCodeChallengeSync:l,base64UrlEncode:d,generateCodeVerifier:u,generateState:a,setAuthorize:i}}])}(angular);
     9155"use strict";!function(e){e.module("lmxApp").factory("socialService",["$http","$window","configurationService","routingService",function(e,t,n,r){function o(){return e.get(p+"Social/Clients").then(function(e){return e.data})}function i(t,n,r,o,i,a){var c={},u="/Login";return"vkontaktenew"===t.toLowerCase()&&(t="VKontakte",c.code_verifier=r,c.device_id=o,i=i.replace("".concat(t,"new"),t)),c.code=n,c.redirect_uri=i,"binding"===a&&(u="/Set"),e.get(p+"User/"+t+u,{params:c}).then(function(e){return e.data})}function a(){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_-",t=Math.floor(10*Math.random())+32;return Array.from({length:t},function(){return e.charAt(Math.floor(Math.random()*e.length))}).join("")}function c(e){return window.btoa(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function u(){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_-",t=Math.floor(86*Math.random())+43;return Array.from({length:t},function(){return e.charAt(Math.floor(Math.random()*e.length))}).join("")}function d(e){return c(String.fromCharCode.apply(null,new Uint8Array(e)))}function l(e){var t=new TextEncoder,n=t.encode(e);return window.crypto.subtle.digest("SHA-256",n).then(function(e){return d(e)})}function h(t){return e.post(p+"User/"+t+"/Remove")}function f(){return e.get(p+"User/Logins").then(function(e){return e.data.socialIdentifiers.map(function(e){return e.provider})})}function g(e,n,o,i,a){var c=n.find(function(t){return t.providerType===e}),u="".concat(r.getLocationURL()).concat(t.location.pathname,"?providerType=").concat(e,"new&action=").concat(o);return"https://id.vk.ru/authorize"===c.authorizeUri.target?(u="".concat(r.getLocationURL()).concat(t.location.pathname,"?providerType=").concat(e,"new&action=").concat(o),c.authorizeUri.target+(/[?&]/.test(c.authorizeUri.target)?"&":"?")+"response_type=code&client_id="+c.clientId+"&redirect_uri="+encodeURIComponent(u)+"&state="+i+"&code_challenge="+a+"&code_challenge_method=S256&scopes=vkid.personal_info,groups"):c.authorizeUri.target+(/[?&]/.test(c.authorizeUri.target)?"&":"?")+"client_id="+c.clientId+"&redirect_uri="+encodeURIComponent(u)+"&response_type=code"}var p=n.host+"v1.2/";return{getAuthorizeURL:g,getClients:o,getSocialIdentifiers:f,removeClient:h,generateCodeChallengeSync:l,base64UrlEncode:d,generateCodeVerifier:u,generateState:a,setAuthorize:i}}])}(angular);
    91569156"use strict";!function(i){i.module("lmxApp").directive("lmxSubscriptions",["$log","translateFilter","userService","configurationService",function(i,n,s,t){return{restrict:"E",replace:!0,scope:!0,templateUrl:"app/directives/subscriptions/subscriptions.html",link:function(r){function o(i){return i.split(/[^a-zA-Z]/).map(function(i){return i}).uniqueValues()}function e(){s.getSubscriptions(c).then(function(i){r.subscriptions=i})["finally"](function(){r.inProgress=!1})}if(!t.common.subscriptionTypes||!t.common.notificationTypes)return void i.error(n("subscriptions.error"));r.inProgress=!0,r.notificationTypes=o(t.common.notificationTypes);var c=o(t.common.subscriptionTypes);r.submitSubscriptions=function(){r.saveInProgress=!0,s.setSubscriptions(r.subscriptions)["finally"](function(){r.saveInProgress=!1})},e()}}}])}(angular);
    91579157"use strict";!function(e){e.module("lmxApp").directive("substypes",["userService","$rootScope",function(e,t){return{template:"",link:function(){t.getState("isNeededSubscriptions")?e.confirmAllSubscription():e.rejectAllSubscriptions()}}}])}(angular);
     
    91879187"use strict";!function(i){i.module("lmxApp").service("shareAuthLoginToRegistration",["configurationService",function(i){this.loginAuth="",this.identifier=i.identifiers.registration[0],this.setIdentifier=function(t){t&&i.identifiers.registration.includes(t)?this.identifier=t:this.identifier=i.identifiers.registration[0]},this.clearLogin=function(){this.loginAuth="",this.identifier=i.identifiers.registration[0]}}])}(angular);
    91889188"use strict";!function(e){var a={captchaResponseRequired:"CaptchaResponseRequired"};e.module("lmxApp").constant("API_RESPONSE_CODE",a)}(angular);
    9189 "use strict";!function(e){var o={host:"https://demo.loymax.tech/publicapi/",locales:"ru",templatesPath:"",customTemplates:[],imagesPath:"https://cdn.loymax.tech/js/v2.1/assets/images/",localesPath:"assets/locale/",reCaptchaSiteKey:"",isWP:"false",pages:{authentication:"#login",resetPassword:"#reset-password",registration:"#registration",offers:"#offers",feedback:"#feedback",anonymousFeedback:"#anonymous-feedback",message:"#message",showcase:"#showcase",coupons:"#coupons",cards:"#cards",favoriteGoods:"#favorite-goods",balance:"#balance",history:"#history",brands:"#brands",merchant:"#merchant",userStatus:"#user-status",social:"#social-binding",announcement:"#announcement",contacts:"#contacts",questionnaire:"#questionnaire",options:"#options",personalOffers:"#personal-offers",personalGoods:"#personal-goods"},components:{authentication:{redirectUrlOnLogin:"#history",redirectUrlOnLogout:"#home",shareAuthLoginToRegistration:!0,authenticationIdentifiers:"phone",resetPasswordIdentifiers:"phone"},registration:{acceptTenderOfferByCheck:!0,authorizeOnRegistrationComplete:!0,forceRegistrationStartOnLoginAttempt:!0,ignoreDocsFetchingErrors:!1,redirectUrlOnRegistrationComplete:"#home",offerHtmlFileId:"",offerPdfFileId:"",opdAgreementFileId:"",referralRegistration:!1,setRegistrationSmsCodeAsPassword:!0,forceEmailStep:!1,registrationIdentifiers:"phone"},cards:{enableAppleWalletCards:!1,enableGoogleWalletCards:!1,cardNumberGraphicalCode:"bar,qr",cvcCodeCardsRegistration:!1},personalOffers:{requestPersonalOffers:!1},personalGoods:{requestPersonalGoods:!1,personalGoodsApprovalMessage:""},favoriteGoods:{favoriteGoodsImagesUrl:""},history:{loadMoreButton:!1,balanceChangeHistory:!1,isBalanceChangeHistoryForCurrentUser:!1,userBalanceHistoryAttributeName:""},support:{supportEmail:"support@loymax.ru"},merchant:{filterByRegion:!1},message:{requestUnreadMessage:!1},announcement:{space:"offerSpace"}},common:{requestUserAttributes:!1,locales:"ru",requestUserStatus:!1,turnOnOfferModal:!0,echequeLogicalName:"",modalShowTimeout:2,modalShowInterval:1,maxPopupNumber:5,popupText:"Подпишись на нашу рассылку и получи **200** бонусных рублей",userStatusAttributeName:"",userPurchasesAmountAttributeName:"",obsoleteBrowserDetection:!0,subscriptionTypes:"Advertisement",notificationTypes:"smsNotification,emailNotification",map:{},resendTimer:0,oAuthClientId:"",authWithPassword:!0,apiVersion:"22.1"},version:"3.5.6"};e.module("lmxApp").constant("DEFAULT_CONFIG",o)}(angular);
     9189"use strict";!function(e){var o={host:"https://demo.loymax.tech/publicapi/",locales:"ru",templatesPath:"",customTemplates:[],imagesPath:"https://cdn.loymax.tech/js/v2.1/assets/images/",localesPath:"assets/locale/",reCaptchaSiteKey:"",isWP:"false",pages:{authentication:"#login",resetPassword:"#reset-password",registration:"#registration",offers:"#offers",feedback:"#feedback",anonymousFeedback:"#anonymous-feedback",message:"#message",showcase:"#showcase",coupons:"#coupons",cards:"#cards",favoriteGoods:"#favorite-goods",balance:"#balance",history:"#history",brands:"#brands",merchant:"#merchant",userStatus:"#user-status",social:"#social-binding",announcement:"#announcement",contacts:"#contacts",questionnaire:"#questionnaire",options:"#options",personalOffers:"#personal-offers",personalGoods:"#personal-goods"},components:{authentication:{redirectUrlOnLogin:"#history",redirectUrlOnLogout:"#home",shareAuthLoginToRegistration:!0,authenticationIdentifiers:"phone",resetPasswordIdentifiers:"phone"},registration:{acceptTenderOfferByCheck:!0,authorizeOnRegistrationComplete:!0,forceRegistrationStartOnLoginAttempt:!0,ignoreDocsFetchingErrors:!1,redirectUrlOnRegistrationComplete:"#home",offerHtmlFileId:"",offerPdfFileId:"",opdAgreementFileId:"",referralRegistration:!1,setRegistrationSmsCodeAsPassword:!0,forceEmailStep:!1,registrationIdentifiers:"phone"},cards:{enableAppleWalletCards:!1,enableGoogleWalletCards:!1,cardNumberGraphicalCode:"bar,qr",cvcCodeCardsRegistration:!1},personalOffers:{requestPersonalOffers:!1},personalGoods:{requestPersonalGoods:!1,personalGoodsApprovalMessage:""},favoriteGoods:{favoriteGoodsImagesUrl:""},history:{loadMoreButton:!1,balanceChangeHistory:!1,isBalanceChangeHistoryForCurrentUser:!1,userBalanceHistoryAttributeName:""},support:{supportEmail:"support@loymax.ru"},merchant:{filterByRegion:!1},message:{requestUnreadMessage:!1},announcement:{space:"offerSpace"}},common:{requestUserAttributes:!1,locales:"ru",requestUserStatus:!1,turnOnOfferModal:!0,echequeLogicalName:"",modalShowTimeout:2,modalShowInterval:1,maxPopupNumber:5,popupText:"Подпишись на нашу рассылку и получи **200** бонусных рублей",userStatusAttributeName:"",userPurchasesAmountAttributeName:"",obsoleteBrowserDetection:!0,subscriptionTypes:"Advertisement",notificationTypes:"smsNotification,emailNotification",map:{},resendTimer:0,oAuthClientId:"",authWithPassword:!0,apiVersion:"22.1"},version:"3.5.7"};e.module("lmxApp").constant("DEFAULT_CONFIG",o)}(angular);
    91909190"use strict";!function(n){var a={phone:"phone",email:"email",card:"card"},e={phone:"phone",card:"card"},o={phone:"phone",email:"email"};n.module("lmxApp").constant("IDENTIFIERS",a),n.module("lmxApp").constant("REGISTRATION_IDENTIFIERS",e),n.module("lmxApp").constant("RESET_PASSWORD_IDENTIFIERS",o)}(angular);
    91919191"use strict";!function(n){var t={INT32_MAX:2147483647};n.module("lmxApp").constant("LIMITS",t)}(angular);
  • loymaxapp/trunk/public/css/style.min.css

    r3331161 r3377401  
    11/**
    2  * Loymax v3.5.20250721-.6 (http://loymax.ru)
     2 * Loymax v3.5.20251013-.7 (http://loymax.ru)
    33 * Copyright 2011-2025 Loymax, Inc.
    44 * License: MIT
  • loymaxapp/trunk/readme.txt

    r3331161 r3377401  
    3737
    3838== Changelog ==
     39= 3.5.7 =
     40* Поправили авторизацию/регистрацию через ВКонтакте
    3941= 3.5.6 =
    4042* Доработали авторизацию/регистрацию через соцсети
Note: See TracChangeset for help on using the changeset viewer.