Changeset 2560331
- Timestamp:
- 07/08/2021 02:34:38 AM (5 years ago)
- Location:
- heslo-login
- Files:
-
- 2 added
- 8 edited
- 2 copied
-
tags/1.0.0/readme.txt (modified) (4 diffs)
-
tags/1.0.2 (copied) (copied from heslo-login/trunk)
-
tags/1.0.2/.babelrc (added)
-
tags/1.0.2/assets/app.js (modified) (1 diff)
-
tags/1.0.2/heslo-login.php (modified) (4 diffs)
-
tags/1.0.2/readme.txt (copied) (copied from heslo-login/trunk/readme.txt) (1 diff)
-
tags/1.0.2/src/admin/admin-index.js (modified) (2 diffs)
-
trunk/.babelrc (added)
-
trunk/assets/app.js (modified) (1 diff)
-
trunk/heslo-login.php (modified) (4 diffs)
-
trunk/readme.txt (modified) (1 diff)
-
trunk/src/admin/admin-index.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
heslo-login/tags/1.0.0/readme.txt
r2545137 r2560331 1 === Passwordless login ===1 === Passwordless Login === 2 2 Contributors: cmccaw 3 Donate link: https://getheslo.com4 3 Tags: login, authentication, identity, security, fido 5 4 Requires at least: 5.1 … … 9 8 License: GPLv2 or later 10 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html 11 12 Eliminate the need for users to enter a password when they log in to their website.10 11 Eliminate the need for users to enter a password when they login to their website. 13 12 Heslo Login enables a passwordless login experience using biometrics such as Touch or Face ID. 14 13 If a device does not support a FIDO authenticator then the user will simply perform an email pin verification 15 14 16 15 == Description == 17 18 16 Add the login button that combines biometric security, convenience, and simplicity for a powerful 1-click login experience. 19 Increase conversion rates and make it extremely easy for your users to log in without a password.17 Increase conversion rates and make it extremely easy for your users to log in without a password. 20 18 21 Heslo Login is FIDO certified and meets all the high security standards to provide the fastest and most secure login experience on the internet.19 Heslo Login is FIDO certified and meets all the high-security standards to provide the fastest and most secure login experience on the internet. 22 20 23 21 ### Benefits: 24 22 25 23 * Eliminate the need for your users to enter a password when they log in to your website. 26 * True passwordless security using Touch and Face ID. The same technology is used by the world's largest companies whose very businesses rely upon better authentication. Bring the same level of security to make the fastest and most secure login on the internet. 27 * 1-click passwordless login experience that is hassle-free, fast and extremely secure. 24 * True passwordless security using Touch and Face ID. The same technology is used by the world\'s largest companies whose very businesses rely upon better authentication. Bring the same level of security to make the fastest and most secure login on the internet. 25 * 1-click passwordless login experience that is hassle-free, fast, and extremely secure. 26 * User device does not support Touch or Face ID? No problem. Simple email verification is maintain to ensure a fast, passwordless login 28 27 * Impress your users with the latest in biometric security 29 28 29 30 30 == Installation == 31 32 31 1. Upload to the `/wp-content/plugins/` directory 33 32 1. Activate the plugin 34 33 1. Go to Settings to configure the app 35 34 36 35 == Frequently Asked Questions == 37 38 36 = How do I add Heslo Login to my site? = 39 37 … … 52 50 = Will my existing users be able to login? = 53 51 54 Of course! Once your users use Heslo Login they wouldn 't want to use the traditional login flow again!52 Of course! Once your users use Heslo Login they wouldn\'t want to use the traditional login flow again! 55 53 56 54 = I have a feature idea. What’s the best way to tell you about it? = … … 62 60 [email protected] usually replies with 24 hours so email anytime with questions about the plugin. 63 61 64 == Screenshots ==65 66 1. This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif). Note that the screenshot is taken from67 the /assets directory or the directory that contains the stable readme.txt (tags or trunk). Screenshots in the /assets68 directory take precedence. For example, `/assets/screenshot-1.png` would win over `/tags/4.3/screenshot-1.png`69 (or jpg, jpeg, gif).70 2. This is the second screen shot71 72 62 == Changelog == 73 74 63 = 1.0 = 75 64 * Initial commit with React admin front end and OpenID authentication flow 76 -
heslo-login/tags/1.0.2/assets/app.js
r2545137 r2560331 30 30 * This source code is licensed under the MIT license found in the 31 31 * LICENSE file in the root directory of this source tree. 32 */var r,o,i,a;if("object"==typeof performance&&"function"==typeof performance.now){var u=performance;t.unstable_now=function(){return u.now()}}else{var l=Date,c=l.now();t.unstable_now=function(){return l.now()-c}}if("undefined"==typeof window||"function"!=typeof MessageChannel){var s=null,f=null,d=function(){if(null!==s)try{var e=t.unstable_now();s(!0,e),s=null}catch(e){throw setTimeout(d,0),e}};r=function(e){null!==s?setTimeout(r,0,e):(s=e,setTimeout(d,0))},o=function(e,t){f=setTimeout(e,t)},i=function(){clearTimeout(f)},t.unstable_shouldYield=function(){return!1},a=t.unstable_forceFrameRate=function(){}}else{var p=window.setTimeout,h=window.clearTimeout;if("undefined"!=typeof console){var v=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),"function"!=typeof v&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var g=!1,y=null,m=-1,b=5,w=0;t.unstable_shouldYield=function(){return t.unstable_now()>=w},a=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):b=0<e?Math.floor(1e3/e):5};var x=new MessageChannel,S=x.port2;x.port1.onmessage=function(){if(null!==y){var e=t.unstable_now();w=e+b;try{y(!0,e)?S.postMessage(null):(g=!1,y=null)}catch(e){throw S.postMessage(null),e}}else g=!1},r=function(e){y=e,g||(g=!0,S.postMessage(null))},o=function(e,n){m=p((function(){e(t.unstable_now())}),n)},i=function(){h(m),m=-1}}function E(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,o=e[r];if(!(void 0!==o&&0<T(o,t)))break e;e[r]=t,e[n]=o,n=r}}function k(e){return void 0===(e=e[0])?null:e}function _(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length;r<o;){var i=2*(r+1)-1,a=e[i],u=i+1,l=e[u];if(void 0!==a&&0>T(a,n))void 0!==l&&0>T(l,a)?(e[r]=l,e[u]=n,r=u):(e[r]=a,e[i]=n,r=i);else{if(!(void 0!==l&&0>T(l,n)))break e;e[r]=l,e[u]=n,r=u}}}return t}return null}function T(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var O=[],C=[],P=1,A=null,R=3,N=!1,L=!1,I=!1;function M(e){for(var t=k(C);null!==t;){if(null===t.callback)_(C);else{if(!(t.startTime<=e))break;_(C),t.sortIndex=t.expirationTime,E(O,t)}t=k(C)}}function j(e){if(I=!1,M(e),!L)if(null!==k(O))L=!0,r(z);else{var t=k(C);null!==t&&o(j,t.startTime-e)}}function z(e,n){L=!1,I&&(I=!1,i()),N=!0;var r=R;try{for(M(n),A=k(O);null!==A&&(!(A.expirationTime>n)||e&&!t.unstable_shouldYield());){var a=A.callback;if("function"==typeof a){A.callback=null,R=A.priorityLevel;var u=a(A.expirationTime<=n);n=t.unstable_now(),"function"==typeof u?A.callback=u:A===k(O)&&_(O),M(n)}else _(O);A=k(O)}if(null!==A)var l=!0;else{var c=k(C);null!==c&&o(j,c.startTime-n),l=!1}return l}finally{A=null,R=r,N=!1}}var F=a;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){L||N||(L=!0,r(z))},t.unstable_getCurrentPriorityLevel=function(){return R},t.unstable_getFirstCallbackNode=function(){return k(O)},t.unstable_next=function(e){switch(R){case 1:case 2:case 3:var t=3;break;default:t=R}var n=R;R=t;try{return e()}finally{R=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=F,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=R;R=e;try{return t()}finally{R=n}},t.unstable_scheduleCallback=function(e,n,a){var u=t.unstable_now();switch("object"==typeof a&&null!==a?a="number"==typeof(a=a.delay)&&0<a?u+a:u:a=u,e){case 1:var l=-1;break;case 2:l=250;break;case 5:l=1073741823;break;case 4:l=1e4;break;default:l=5e3}return e={id:P++,callback:n,priorityLevel:e,startTime:a,expirationTime:l=a+l,sortIndex:-1},a>u?(e.sortIndex=a,E(C,e),null===k(O)&&e===k(C)&&(I?i():I=!0,o(j,a-u))):(e.sortIndex=l,E(O,e),L||N||(L=!0,r(z))),e},t.unstable_wrapCallback=function(e){var t=R;return function(){var n=R;R=t;try{return e.apply(this,arguments)}finally{R=n}}}},function(e,t,n){"use strict";n.r(t);n(154),n(385);var r=n(2),o=n.n(r),i=n(153),a=n.n(i);function u(e,t,n,r,o,i,a){try{var u=e[i](a),l=u.value}catch(e){return void n(e)}u.done?t(l):Promise.resolve(l).then(r,o)}function l(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){u(i,r,o,a,l,"next",e)}function l(e){u(i,r,o,a,l,"throw",e)}a(void 0)}))}}function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var f=function(e){var t=e.fnChange,n=e.title,r=void 0===n?"":n,i=e.checked,a=void 0!==i&&i;return o.a.createElement("label",null,o.a.createElement("input",{onChange:function(e){t(e.target.checked)},type:"checkbox",checked:a}),r)},d=function(e){var t=e.nonce,n=e.urls,i=void 0===n?{}:n,a=c(Object(r.useState)(""),2),u=a[0],s=a[1],d=c(Object(r.useState)(""),2),p=d[0],h=d[1],v=c(Object(r.useState)("false"),2),g=v[0],y=v[1],m=c(Object(r.useState)(""),2),b=m[0],w=m[1],x=c(Object(r.useState)(""),2),S=x[0],E=x[1],k=c(Object(r.useState)(""),2),_=k[0],T=k[1],O=function(){var e=l(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(i.setConfig,{body:JSON.stringify({clientKey:p,secretKey:u,autoInstallation:g}),method:"POST",headers:new Headers({"Content-Type":"application/json","X-WP-Nonce":t})});case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),C=function(){var e=l(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.preventDefault(),e.prev=1,e.next=4,O();case 4:w(""),E("Settings saved"),e.next=12;break;case 8:e.prev=8,e.t0=e.catch(1),w(e.t0.message),E("");case 12:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(t){return e.apply(this,arguments)}}(),P=function(){var e=l(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,T("Auto installation ".concat("true"===g?"enabled":"disabled")),e.next=4,O();case 4:e.next=9;break;case 6:e.prev=6,e.t0=e.catch(0),w(e.t0.message);case 9:case"end":return e.stop()}}),e,null,[[0,6]])})));return function(){return e.apply(this,arguments)}}(),A=function(){var e=l(regeneratorRuntime.mark((function e(){var n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(i.getConfig,{headers:new Headers({"X-WP-Nonce":t})});case 2:return n=e.sent,e.next=5,n.json();case 5:r=e.sent,h(r.value.clientKey),s(r.value.secretKey),y(r.value.autoInstallation);case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();Object(r.useEffect)((function(){A()}),[]);var R=new URL(i.callback) ;return console.log(g),o.a.createElement("div",null,o.a.createElement("h1",null,"Heslo"),o.a.createElement("h2",null,"Configuring Heslo Login is easy as 1-2-3"),o.a.createElement("ol",null,o.a.createElement("li",null,"Create a ",o.a.createElement("b",null,o.a.createElement("a",{href:"https://dashboard.getheslo.com?redirect_page=applications",target:"_blank"},"Heslo account"))),o.a.createElement("li",null,"Create a wordpress application. Use ",o.a.createElement("b",null,R.origin)," when prompted for the base url"),o.a.createElement("li",null,"Copy and paste the generated client and secret keys below")),o.a.createElement("form",{onSubmit:C},o.a.createElement("table",{className:"form-table"},o.a.createElement("tr",null,o.a.createElement("th",{scope:"row"},o.a.createElement("label",{for:"api_key"},"Api key (required)")),o.a.createElement("td",null,o.a.createElement("input",{name:"api_key",id:"api_key",type:"text",className:"regular-text",autocomplete:"off",value:p,onChange:function(e){return h(e.target.value)}}))),o.a.createElement("tr",null,o.a.createElement("th",{scope:"row"},o.a.createElement("label",{for:"secret_key"},"Secret key (required)")),o.a.createElement("td",null,o.a.createElement("input",{name:"secret_key",id:"secret_key",className:"regular-text",autocomplete:"off",value:u,onChange:function(e){return s(e.target.value)}}))),b&&o.a.createElement("div",{className:"error settings-error"},o.a.createElement("p",null,b)),S&&o.a.createElement("div",{className:"notice notice-success"},o.a.createElement("p",null,S))),o.a.createElement("p",{class:"submit"},o.a.createElement("input",{type:"submit",name:"submit",id:"submit",class:"button button-primary",value:"Save Changes"}))),o.a.createElement("h2",null,"Auto Installation"),o.a.createElement(f,{title:"Automatically add the 'Login with Heslo' to your login page",fnChange:function(e){y(e?"true":"false")},checked:"true"===g}),o.a.createElement("p",{class:"submit"},o.a.createElement("input",{type:"submit",name:"submit",id:"submit",class:"button button-primary",value:"Save Changes",onClick:P})),_&&o.a.createElement("div",{className:"notice notice-success"},o.a.createElement("p",null,_)),o.a.createElement("h2",null,"Custom Installation"),o.a.createElement("p",null,o.a.createElement("label",{for:"custom_installation"},o.a.createElement("input",{type:"text",name:"custom_installation",id:"custom_installation",value:"[heslo_login]",disabled:"disabled",class:"regular-text"}),o.a.createElement("p",{class:"description",id:"tagline-description"}," Copy & Paste the following code where you want the Heslo button to appear."))))},p=document.getElementById("heslo-login-settings"),h=window.heslo_login_ajax,v=h.urls,g=void 0===v?{}:v,y=h.nonce,m=void 0===y?"":y;p&&a.a.render(o.a.createElement(d,{nonce:m,urls:g}),p)}]);32 */var r,o,i,a;if("object"==typeof performance&&"function"==typeof performance.now){var u=performance;t.unstable_now=function(){return u.now()}}else{var l=Date,c=l.now();t.unstable_now=function(){return l.now()-c}}if("undefined"==typeof window||"function"!=typeof MessageChannel){var s=null,f=null,d=function(){if(null!==s)try{var e=t.unstable_now();s(!0,e),s=null}catch(e){throw setTimeout(d,0),e}};r=function(e){null!==s?setTimeout(r,0,e):(s=e,setTimeout(d,0))},o=function(e,t){f=setTimeout(e,t)},i=function(){clearTimeout(f)},t.unstable_shouldYield=function(){return!1},a=t.unstable_forceFrameRate=function(){}}else{var p=window.setTimeout,h=window.clearTimeout;if("undefined"!=typeof console){var v=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),"function"!=typeof v&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var g=!1,y=null,m=-1,b=5,w=0;t.unstable_shouldYield=function(){return t.unstable_now()>=w},a=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):b=0<e?Math.floor(1e3/e):5};var x=new MessageChannel,S=x.port2;x.port1.onmessage=function(){if(null!==y){var e=t.unstable_now();w=e+b;try{y(!0,e)?S.postMessage(null):(g=!1,y=null)}catch(e){throw S.postMessage(null),e}}else g=!1},r=function(e){y=e,g||(g=!0,S.postMessage(null))},o=function(e,n){m=p((function(){e(t.unstable_now())}),n)},i=function(){h(m),m=-1}}function E(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,o=e[r];if(!(void 0!==o&&0<T(o,t)))break e;e[r]=t,e[n]=o,n=r}}function k(e){return void 0===(e=e[0])?null:e}function _(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length;r<o;){var i=2*(r+1)-1,a=e[i],u=i+1,l=e[u];if(void 0!==a&&0>T(a,n))void 0!==l&&0>T(l,a)?(e[r]=l,e[u]=n,r=u):(e[r]=a,e[i]=n,r=i);else{if(!(void 0!==l&&0>T(l,n)))break e;e[r]=l,e[u]=n,r=u}}}return t}return null}function T(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var O=[],C=[],P=1,A=null,R=3,N=!1,L=!1,I=!1;function M(e){for(var t=k(C);null!==t;){if(null===t.callback)_(C);else{if(!(t.startTime<=e))break;_(C),t.sortIndex=t.expirationTime,E(O,t)}t=k(C)}}function j(e){if(I=!1,M(e),!L)if(null!==k(O))L=!0,r(z);else{var t=k(C);null!==t&&o(j,t.startTime-e)}}function z(e,n){L=!1,I&&(I=!1,i()),N=!0;var r=R;try{for(M(n),A=k(O);null!==A&&(!(A.expirationTime>n)||e&&!t.unstable_shouldYield());){var a=A.callback;if("function"==typeof a){A.callback=null,R=A.priorityLevel;var u=a(A.expirationTime<=n);n=t.unstable_now(),"function"==typeof u?A.callback=u:A===k(O)&&_(O),M(n)}else _(O);A=k(O)}if(null!==A)var l=!0;else{var c=k(C);null!==c&&o(j,c.startTime-n),l=!1}return l}finally{A=null,R=r,N=!1}}var F=a;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){L||N||(L=!0,r(z))},t.unstable_getCurrentPriorityLevel=function(){return R},t.unstable_getFirstCallbackNode=function(){return k(O)},t.unstable_next=function(e){switch(R){case 1:case 2:case 3:var t=3;break;default:t=R}var n=R;R=t;try{return e()}finally{R=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=F,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=R;R=e;try{return t()}finally{R=n}},t.unstable_scheduleCallback=function(e,n,a){var u=t.unstable_now();switch("object"==typeof a&&null!==a?a="number"==typeof(a=a.delay)&&0<a?u+a:u:a=u,e){case 1:var l=-1;break;case 2:l=250;break;case 5:l=1073741823;break;case 4:l=1e4;break;default:l=5e3}return e={id:P++,callback:n,priorityLevel:e,startTime:a,expirationTime:l=a+l,sortIndex:-1},a>u?(e.sortIndex=a,E(C,e),null===k(O)&&e===k(C)&&(I?i():I=!0,o(j,a-u))):(e.sortIndex=l,E(O,e),L||N||(L=!0,r(z))),e},t.unstable_wrapCallback=function(e){var t=R;return function(){var n=R;R=t;try{return e.apply(this,arguments)}finally{R=n}}}},function(e,t,n){"use strict";n.r(t);n(154),n(385);var r=n(2),o=n.n(r),i=n(153),a=n.n(i);function u(e,t,n,r,o,i,a){try{var u=e[i](a),l=u.value}catch(e){return void n(e)}u.done?t(l):Promise.resolve(l).then(r,o)}function l(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){u(i,r,o,a,l,"next",e)}function l(e){u(i,r,o,a,l,"throw",e)}a(void 0)}))}}function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var f=function(e){var t=e.fnChange,n=e.title,r=void 0===n?"":n,i=e.checked,a=void 0!==i&&i;return o.a.createElement("label",null,o.a.createElement("input",{onChange:function(e){t(e.target.checked)},type:"checkbox",checked:a}),r)},d=function(e){var t=e.nonce,n=e.urls,i=void 0===n?{}:n,a=c(Object(r.useState)(""),2),u=a[0],s=a[1],d=c(Object(r.useState)(""),2),p=d[0],h=d[1],v=c(Object(r.useState)("false"),2),g=v[0],y=v[1],m=c(Object(r.useState)(""),2),b=m[0],w=m[1],x=c(Object(r.useState)(""),2),S=x[0],E=x[1],k=c(Object(r.useState)(""),2),_=k[0],T=k[1],O=function(){var e=l(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(i.setConfig,{body:JSON.stringify({clientKey:p,secretKey:u,autoInstallation:g}),method:"POST",headers:new Headers({"Content-Type":"application/json","X-WP-Nonce":t})});case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),C=function(){var e=l(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.preventDefault(),e.prev=1,e.next=4,O();case 4:w(""),E("Settings saved"),e.next=12;break;case 8:e.prev=8,e.t0=e.catch(1),w(e.t0.message),E("");case 12:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(t){return e.apply(this,arguments)}}(),P=function(){var e=l(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,T("Auto installation ".concat("true"===g?"enabled":"disabled")),e.next=4,O();case 4:e.next=9;break;case 6:e.prev=6,e.t0=e.catch(0),w(e.t0.message);case 9:case"end":return e.stop()}}),e,null,[[0,6]])})));return function(){return e.apply(this,arguments)}}(),A=function(){var e=l(regeneratorRuntime.mark((function e(){var n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(i.getConfig,{headers:new Headers({"X-WP-Nonce":t})});case 2:return n=e.sent,e.next=5,n.json();case 5:r=e.sent,h(r.value.clientKey),s(r.value.secretKey),y(r.value.autoInstallation);case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();Object(r.useEffect)((function(){A()}),[]);var R=new URL(i.callback),N=R.pathname.split("/")[1],L="wp-json"===N?"":"/".concat(N);return o.a.createElement("div",null,o.a.createElement("h1",null,"Heslo"),o.a.createElement("h2",null,"Configuring Heslo Login is easy as 1-2-3"),o.a.createElement("ol",null,o.a.createElement("li",null,"Create a ",o.a.createElement("b",null,o.a.createElement("a",{href:"https://dashboard.getheslo.com?redirect_page=applications",target:"_blank"},"Heslo account"))),o.a.createElement("li",null,"Create a wordpress application. Use ",o.a.createElement("b",null,R.origin,L)," when prompted for the base url"),o.a.createElement("li",null,"Copy and paste the generated client and secret keys below")),o.a.createElement("form",{onSubmit:C},o.a.createElement("table",{className:"form-table"},o.a.createElement("tr",null,o.a.createElement("th",{scope:"row"},o.a.createElement("label",{for:"api_key"},"Api key (required)")),o.a.createElement("td",null,o.a.createElement("input",{name:"api_key",id:"api_key",type:"text",className:"regular-text",autocomplete:"off",value:p,onChange:function(e){return h(e.target.value)}}))),o.a.createElement("tr",null,o.a.createElement("th",{scope:"row"},o.a.createElement("label",{for:"secret_key"},"Secret key (required)")),o.a.createElement("td",null,o.a.createElement("input",{name:"secret_key",id:"secret_key",className:"regular-text",autocomplete:"off",value:u,onChange:function(e){return s(e.target.value)}}))),b&&o.a.createElement("div",{className:"error settings-error"},o.a.createElement("p",null,b)),S&&o.a.createElement("div",{className:"notice notice-success"},o.a.createElement("p",null,S))),o.a.createElement("p",{class:"submit"},o.a.createElement("input",{type:"submit",name:"submit",id:"submit",class:"button button-primary",value:"Save Changes"}))),o.a.createElement("h2",null,"Auto Installation"),o.a.createElement(f,{title:"Automatically add the 'Login with Heslo' to your login page",fnChange:function(e){y(e?"true":"false")},checked:"true"===g}),o.a.createElement("p",{class:"submit"},o.a.createElement("input",{type:"submit",name:"submit",id:"submit",class:"button button-primary",value:"Save Changes",onClick:P})),_&&o.a.createElement("div",{className:"notice notice-success"},o.a.createElement("p",null,_)),o.a.createElement("h2",null,"Custom Installation"),o.a.createElement("p",null,o.a.createElement("label",{for:"custom_installation"},o.a.createElement("input",{type:"text",name:"custom_installation",id:"custom_installation",value:"[heslo_login]",disabled:"disabled",class:"regular-text"}),o.a.createElement("p",{class:"description",id:"tagline-description"}," Copy & Paste the following code where you want the Heslo button to appear."))))},p=document.getElementById("heslo-login-settings"),h=window.heslo_login_ajax,v=h.urls,g=void 0===v?{}:v,y=h.nonce,m=void 0===y?"":y;p&&a.a.render(o.a.createElement(d,{nonce:m,urls:g}),p)}]); -
heslo-login/tags/1.0.2/heslo-login.php
r2545137 r2560331 4 4 * Plugin URI: https://github.com/getheslo/wordpress-heslo-login 5 5 * Description: Passwordless login for your users using Touch and Face ID 6 * Version: 1.0. 06 * Version: 1.0.2 7 7 * Author: Heslo 8 8 * Author URI: https://www.getheslo.com … … 46 46 { 47 47 $client_key = get_option('heslo_login_client_key'); 48 $js_to_load = heslo_login_is_local_dev() ? 'http://localhost:3000/login/script' :'https://channel-api.getheslo.com/login/script';48 $js_to_load = 'https://channel-api.getheslo.com/login/script'; 49 49 50 50 $args = array( 51 51 'application_client_id' => $client_key, 52 52 ); 53 wp_enqueue_script('heslo_widget_script', esc_url(add_query_arg($args, $js_to_load)), '', time() , true);53 wp_enqueue_script('heslo_widget_script', add_query_arg($args, $js_to_load), '', time() , true); 54 54 } 55 55 … … 142 142 function heslo_login_auth($request) 143 143 { 144 $metadata = heslo_login_ is_local_dev() ? heslo_login_http('http://localhost:9000/.well-known/openid-configuration') : heslo_login_http('https://api.getheslo.com/.well-known/openid-configuration');144 $metadata = heslo_login_http('https://api.getheslo.com/.well-known/openid-configuration'); 145 145 146 146 $identifier = sanitize_text_field($_GET['identifier']); … … 160 160 function heslo_login_auth_callback($request) 161 161 { 162 $metadata = heslo_login_ is_local_dev() ? heslo_login_http('http://localhost:9000/.well-known/openid-configuration') : heslo_login_http('https://api.getheslo.com/.well-known/openid-configuration');162 $metadata = heslo_login_http('https://api.getheslo.com/.well-known/openid-configuration'); 163 163 164 164 $client_key = get_option('heslo_login_client_key'); -
heslo-login/tags/1.0.2/readme.txt
r2545170 r2560331 5 5 Tested up to: 5.7.2 6 6 Requires PHP: 7.0 7 Stable tag: 1.0. 17 Stable tag: 1.0.2 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html -
heslo-login/tags/1.0.2/src/admin/admin-index.js
r2545137 r2560331 59 59 const baseUrl = new URL(urls.callback); 60 60 61 const firstPath = baseUrl.pathname.split('/')[1]; 62 const suffix = firstPath === 'wp-json' ? '' : `/${firstPath}`; 61 63 return ( 62 64 <div> … … 65 67 <ol> 66 68 <li>Create a <b><a href='https://dashboard.getheslo.com?redirect_page=applications' target='_blank'>Heslo account</a></b></li> 67 <li>Create a wordpress application. Use <b>{baseUrl.origin} </b> when prompted for the base url</li>69 <li>Create a wordpress application. Use <b>{baseUrl.origin}{suffix}</b> when prompted for the base url</li> 68 70 <li>Copy and paste the generated client and secret keys below</li> 69 71 </ol> -
heslo-login/trunk/assets/app.js
r2545137 r2560331 30 30 * This source code is licensed under the MIT license found in the 31 31 * LICENSE file in the root directory of this source tree. 32 */var r,o,i,a;if("object"==typeof performance&&"function"==typeof performance.now){var u=performance;t.unstable_now=function(){return u.now()}}else{var l=Date,c=l.now();t.unstable_now=function(){return l.now()-c}}if("undefined"==typeof window||"function"!=typeof MessageChannel){var s=null,f=null,d=function(){if(null!==s)try{var e=t.unstable_now();s(!0,e),s=null}catch(e){throw setTimeout(d,0),e}};r=function(e){null!==s?setTimeout(r,0,e):(s=e,setTimeout(d,0))},o=function(e,t){f=setTimeout(e,t)},i=function(){clearTimeout(f)},t.unstable_shouldYield=function(){return!1},a=t.unstable_forceFrameRate=function(){}}else{var p=window.setTimeout,h=window.clearTimeout;if("undefined"!=typeof console){var v=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),"function"!=typeof v&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var g=!1,y=null,m=-1,b=5,w=0;t.unstable_shouldYield=function(){return t.unstable_now()>=w},a=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):b=0<e?Math.floor(1e3/e):5};var x=new MessageChannel,S=x.port2;x.port1.onmessage=function(){if(null!==y){var e=t.unstable_now();w=e+b;try{y(!0,e)?S.postMessage(null):(g=!1,y=null)}catch(e){throw S.postMessage(null),e}}else g=!1},r=function(e){y=e,g||(g=!0,S.postMessage(null))},o=function(e,n){m=p((function(){e(t.unstable_now())}),n)},i=function(){h(m),m=-1}}function E(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,o=e[r];if(!(void 0!==o&&0<T(o,t)))break e;e[r]=t,e[n]=o,n=r}}function k(e){return void 0===(e=e[0])?null:e}function _(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length;r<o;){var i=2*(r+1)-1,a=e[i],u=i+1,l=e[u];if(void 0!==a&&0>T(a,n))void 0!==l&&0>T(l,a)?(e[r]=l,e[u]=n,r=u):(e[r]=a,e[i]=n,r=i);else{if(!(void 0!==l&&0>T(l,n)))break e;e[r]=l,e[u]=n,r=u}}}return t}return null}function T(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var O=[],C=[],P=1,A=null,R=3,N=!1,L=!1,I=!1;function M(e){for(var t=k(C);null!==t;){if(null===t.callback)_(C);else{if(!(t.startTime<=e))break;_(C),t.sortIndex=t.expirationTime,E(O,t)}t=k(C)}}function j(e){if(I=!1,M(e),!L)if(null!==k(O))L=!0,r(z);else{var t=k(C);null!==t&&o(j,t.startTime-e)}}function z(e,n){L=!1,I&&(I=!1,i()),N=!0;var r=R;try{for(M(n),A=k(O);null!==A&&(!(A.expirationTime>n)||e&&!t.unstable_shouldYield());){var a=A.callback;if("function"==typeof a){A.callback=null,R=A.priorityLevel;var u=a(A.expirationTime<=n);n=t.unstable_now(),"function"==typeof u?A.callback=u:A===k(O)&&_(O),M(n)}else _(O);A=k(O)}if(null!==A)var l=!0;else{var c=k(C);null!==c&&o(j,c.startTime-n),l=!1}return l}finally{A=null,R=r,N=!1}}var F=a;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){L||N||(L=!0,r(z))},t.unstable_getCurrentPriorityLevel=function(){return R},t.unstable_getFirstCallbackNode=function(){return k(O)},t.unstable_next=function(e){switch(R){case 1:case 2:case 3:var t=3;break;default:t=R}var n=R;R=t;try{return e()}finally{R=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=F,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=R;R=e;try{return t()}finally{R=n}},t.unstable_scheduleCallback=function(e,n,a){var u=t.unstable_now();switch("object"==typeof a&&null!==a?a="number"==typeof(a=a.delay)&&0<a?u+a:u:a=u,e){case 1:var l=-1;break;case 2:l=250;break;case 5:l=1073741823;break;case 4:l=1e4;break;default:l=5e3}return e={id:P++,callback:n,priorityLevel:e,startTime:a,expirationTime:l=a+l,sortIndex:-1},a>u?(e.sortIndex=a,E(C,e),null===k(O)&&e===k(C)&&(I?i():I=!0,o(j,a-u))):(e.sortIndex=l,E(O,e),L||N||(L=!0,r(z))),e},t.unstable_wrapCallback=function(e){var t=R;return function(){var n=R;R=t;try{return e.apply(this,arguments)}finally{R=n}}}},function(e,t,n){"use strict";n.r(t);n(154),n(385);var r=n(2),o=n.n(r),i=n(153),a=n.n(i);function u(e,t,n,r,o,i,a){try{var u=e[i](a),l=u.value}catch(e){return void n(e)}u.done?t(l):Promise.resolve(l).then(r,o)}function l(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){u(i,r,o,a,l,"next",e)}function l(e){u(i,r,o,a,l,"throw",e)}a(void 0)}))}}function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var f=function(e){var t=e.fnChange,n=e.title,r=void 0===n?"":n,i=e.checked,a=void 0!==i&&i;return o.a.createElement("label",null,o.a.createElement("input",{onChange:function(e){t(e.target.checked)},type:"checkbox",checked:a}),r)},d=function(e){var t=e.nonce,n=e.urls,i=void 0===n?{}:n,a=c(Object(r.useState)(""),2),u=a[0],s=a[1],d=c(Object(r.useState)(""),2),p=d[0],h=d[1],v=c(Object(r.useState)("false"),2),g=v[0],y=v[1],m=c(Object(r.useState)(""),2),b=m[0],w=m[1],x=c(Object(r.useState)(""),2),S=x[0],E=x[1],k=c(Object(r.useState)(""),2),_=k[0],T=k[1],O=function(){var e=l(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(i.setConfig,{body:JSON.stringify({clientKey:p,secretKey:u,autoInstallation:g}),method:"POST",headers:new Headers({"Content-Type":"application/json","X-WP-Nonce":t})});case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),C=function(){var e=l(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.preventDefault(),e.prev=1,e.next=4,O();case 4:w(""),E("Settings saved"),e.next=12;break;case 8:e.prev=8,e.t0=e.catch(1),w(e.t0.message),E("");case 12:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(t){return e.apply(this,arguments)}}(),P=function(){var e=l(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,T("Auto installation ".concat("true"===g?"enabled":"disabled")),e.next=4,O();case 4:e.next=9;break;case 6:e.prev=6,e.t0=e.catch(0),w(e.t0.message);case 9:case"end":return e.stop()}}),e,null,[[0,6]])})));return function(){return e.apply(this,arguments)}}(),A=function(){var e=l(regeneratorRuntime.mark((function e(){var n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(i.getConfig,{headers:new Headers({"X-WP-Nonce":t})});case 2:return n=e.sent,e.next=5,n.json();case 5:r=e.sent,h(r.value.clientKey),s(r.value.secretKey),y(r.value.autoInstallation);case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();Object(r.useEffect)((function(){A()}),[]);var R=new URL(i.callback) ;return console.log(g),o.a.createElement("div",null,o.a.createElement("h1",null,"Heslo"),o.a.createElement("h2",null,"Configuring Heslo Login is easy as 1-2-3"),o.a.createElement("ol",null,o.a.createElement("li",null,"Create a ",o.a.createElement("b",null,o.a.createElement("a",{href:"https://dashboard.getheslo.com?redirect_page=applications",target:"_blank"},"Heslo account"))),o.a.createElement("li",null,"Create a wordpress application. Use ",o.a.createElement("b",null,R.origin)," when prompted for the base url"),o.a.createElement("li",null,"Copy and paste the generated client and secret keys below")),o.a.createElement("form",{onSubmit:C},o.a.createElement("table",{className:"form-table"},o.a.createElement("tr",null,o.a.createElement("th",{scope:"row"},o.a.createElement("label",{for:"api_key"},"Api key (required)")),o.a.createElement("td",null,o.a.createElement("input",{name:"api_key",id:"api_key",type:"text",className:"regular-text",autocomplete:"off",value:p,onChange:function(e){return h(e.target.value)}}))),o.a.createElement("tr",null,o.a.createElement("th",{scope:"row"},o.a.createElement("label",{for:"secret_key"},"Secret key (required)")),o.a.createElement("td",null,o.a.createElement("input",{name:"secret_key",id:"secret_key",className:"regular-text",autocomplete:"off",value:u,onChange:function(e){return s(e.target.value)}}))),b&&o.a.createElement("div",{className:"error settings-error"},o.a.createElement("p",null,b)),S&&o.a.createElement("div",{className:"notice notice-success"},o.a.createElement("p",null,S))),o.a.createElement("p",{class:"submit"},o.a.createElement("input",{type:"submit",name:"submit",id:"submit",class:"button button-primary",value:"Save Changes"}))),o.a.createElement("h2",null,"Auto Installation"),o.a.createElement(f,{title:"Automatically add the 'Login with Heslo' to your login page",fnChange:function(e){y(e?"true":"false")},checked:"true"===g}),o.a.createElement("p",{class:"submit"},o.a.createElement("input",{type:"submit",name:"submit",id:"submit",class:"button button-primary",value:"Save Changes",onClick:P})),_&&o.a.createElement("div",{className:"notice notice-success"},o.a.createElement("p",null,_)),o.a.createElement("h2",null,"Custom Installation"),o.a.createElement("p",null,o.a.createElement("label",{for:"custom_installation"},o.a.createElement("input",{type:"text",name:"custom_installation",id:"custom_installation",value:"[heslo_login]",disabled:"disabled",class:"regular-text"}),o.a.createElement("p",{class:"description",id:"tagline-description"}," Copy & Paste the following code where you want the Heslo button to appear."))))},p=document.getElementById("heslo-login-settings"),h=window.heslo_login_ajax,v=h.urls,g=void 0===v?{}:v,y=h.nonce,m=void 0===y?"":y;p&&a.a.render(o.a.createElement(d,{nonce:m,urls:g}),p)}]);32 */var r,o,i,a;if("object"==typeof performance&&"function"==typeof performance.now){var u=performance;t.unstable_now=function(){return u.now()}}else{var l=Date,c=l.now();t.unstable_now=function(){return l.now()-c}}if("undefined"==typeof window||"function"!=typeof MessageChannel){var s=null,f=null,d=function(){if(null!==s)try{var e=t.unstable_now();s(!0,e),s=null}catch(e){throw setTimeout(d,0),e}};r=function(e){null!==s?setTimeout(r,0,e):(s=e,setTimeout(d,0))},o=function(e,t){f=setTimeout(e,t)},i=function(){clearTimeout(f)},t.unstable_shouldYield=function(){return!1},a=t.unstable_forceFrameRate=function(){}}else{var p=window.setTimeout,h=window.clearTimeout;if("undefined"!=typeof console){var v=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),"function"!=typeof v&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var g=!1,y=null,m=-1,b=5,w=0;t.unstable_shouldYield=function(){return t.unstable_now()>=w},a=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):b=0<e?Math.floor(1e3/e):5};var x=new MessageChannel,S=x.port2;x.port1.onmessage=function(){if(null!==y){var e=t.unstable_now();w=e+b;try{y(!0,e)?S.postMessage(null):(g=!1,y=null)}catch(e){throw S.postMessage(null),e}}else g=!1},r=function(e){y=e,g||(g=!0,S.postMessage(null))},o=function(e,n){m=p((function(){e(t.unstable_now())}),n)},i=function(){h(m),m=-1}}function E(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,o=e[r];if(!(void 0!==o&&0<T(o,t)))break e;e[r]=t,e[n]=o,n=r}}function k(e){return void 0===(e=e[0])?null:e}function _(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length;r<o;){var i=2*(r+1)-1,a=e[i],u=i+1,l=e[u];if(void 0!==a&&0>T(a,n))void 0!==l&&0>T(l,a)?(e[r]=l,e[u]=n,r=u):(e[r]=a,e[i]=n,r=i);else{if(!(void 0!==l&&0>T(l,n)))break e;e[r]=l,e[u]=n,r=u}}}return t}return null}function T(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var O=[],C=[],P=1,A=null,R=3,N=!1,L=!1,I=!1;function M(e){for(var t=k(C);null!==t;){if(null===t.callback)_(C);else{if(!(t.startTime<=e))break;_(C),t.sortIndex=t.expirationTime,E(O,t)}t=k(C)}}function j(e){if(I=!1,M(e),!L)if(null!==k(O))L=!0,r(z);else{var t=k(C);null!==t&&o(j,t.startTime-e)}}function z(e,n){L=!1,I&&(I=!1,i()),N=!0;var r=R;try{for(M(n),A=k(O);null!==A&&(!(A.expirationTime>n)||e&&!t.unstable_shouldYield());){var a=A.callback;if("function"==typeof a){A.callback=null,R=A.priorityLevel;var u=a(A.expirationTime<=n);n=t.unstable_now(),"function"==typeof u?A.callback=u:A===k(O)&&_(O),M(n)}else _(O);A=k(O)}if(null!==A)var l=!0;else{var c=k(C);null!==c&&o(j,c.startTime-n),l=!1}return l}finally{A=null,R=r,N=!1}}var F=a;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){L||N||(L=!0,r(z))},t.unstable_getCurrentPriorityLevel=function(){return R},t.unstable_getFirstCallbackNode=function(){return k(O)},t.unstable_next=function(e){switch(R){case 1:case 2:case 3:var t=3;break;default:t=R}var n=R;R=t;try{return e()}finally{R=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=F,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=R;R=e;try{return t()}finally{R=n}},t.unstable_scheduleCallback=function(e,n,a){var u=t.unstable_now();switch("object"==typeof a&&null!==a?a="number"==typeof(a=a.delay)&&0<a?u+a:u:a=u,e){case 1:var l=-1;break;case 2:l=250;break;case 5:l=1073741823;break;case 4:l=1e4;break;default:l=5e3}return e={id:P++,callback:n,priorityLevel:e,startTime:a,expirationTime:l=a+l,sortIndex:-1},a>u?(e.sortIndex=a,E(C,e),null===k(O)&&e===k(C)&&(I?i():I=!0,o(j,a-u))):(e.sortIndex=l,E(O,e),L||N||(L=!0,r(z))),e},t.unstable_wrapCallback=function(e){var t=R;return function(){var n=R;R=t;try{return e.apply(this,arguments)}finally{R=n}}}},function(e,t,n){"use strict";n.r(t);n(154),n(385);var r=n(2),o=n.n(r),i=n(153),a=n.n(i);function u(e,t,n,r,o,i,a){try{var u=e[i](a),l=u.value}catch(e){return void n(e)}u.done?t(l):Promise.resolve(l).then(r,o)}function l(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){u(i,r,o,a,l,"next",e)}function l(e){u(i,r,o,a,l,"throw",e)}a(void 0)}))}}function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var f=function(e){var t=e.fnChange,n=e.title,r=void 0===n?"":n,i=e.checked,a=void 0!==i&&i;return o.a.createElement("label",null,o.a.createElement("input",{onChange:function(e){t(e.target.checked)},type:"checkbox",checked:a}),r)},d=function(e){var t=e.nonce,n=e.urls,i=void 0===n?{}:n,a=c(Object(r.useState)(""),2),u=a[0],s=a[1],d=c(Object(r.useState)(""),2),p=d[0],h=d[1],v=c(Object(r.useState)("false"),2),g=v[0],y=v[1],m=c(Object(r.useState)(""),2),b=m[0],w=m[1],x=c(Object(r.useState)(""),2),S=x[0],E=x[1],k=c(Object(r.useState)(""),2),_=k[0],T=k[1],O=function(){var e=l(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(i.setConfig,{body:JSON.stringify({clientKey:p,secretKey:u,autoInstallation:g}),method:"POST",headers:new Headers({"Content-Type":"application/json","X-WP-Nonce":t})});case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),C=function(){var e=l(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.preventDefault(),e.prev=1,e.next=4,O();case 4:w(""),E("Settings saved"),e.next=12;break;case 8:e.prev=8,e.t0=e.catch(1),w(e.t0.message),E("");case 12:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(t){return e.apply(this,arguments)}}(),P=function(){var e=l(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,T("Auto installation ".concat("true"===g?"enabled":"disabled")),e.next=4,O();case 4:e.next=9;break;case 6:e.prev=6,e.t0=e.catch(0),w(e.t0.message);case 9:case"end":return e.stop()}}),e,null,[[0,6]])})));return function(){return e.apply(this,arguments)}}(),A=function(){var e=l(regeneratorRuntime.mark((function e(){var n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(i.getConfig,{headers:new Headers({"X-WP-Nonce":t})});case 2:return n=e.sent,e.next=5,n.json();case 5:r=e.sent,h(r.value.clientKey),s(r.value.secretKey),y(r.value.autoInstallation);case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();Object(r.useEffect)((function(){A()}),[]);var R=new URL(i.callback),N=R.pathname.split("/")[1],L="wp-json"===N?"":"/".concat(N);return o.a.createElement("div",null,o.a.createElement("h1",null,"Heslo"),o.a.createElement("h2",null,"Configuring Heslo Login is easy as 1-2-3"),o.a.createElement("ol",null,o.a.createElement("li",null,"Create a ",o.a.createElement("b",null,o.a.createElement("a",{href:"https://dashboard.getheslo.com?redirect_page=applications",target:"_blank"},"Heslo account"))),o.a.createElement("li",null,"Create a wordpress application. Use ",o.a.createElement("b",null,R.origin,L)," when prompted for the base url"),o.a.createElement("li",null,"Copy and paste the generated client and secret keys below")),o.a.createElement("form",{onSubmit:C},o.a.createElement("table",{className:"form-table"},o.a.createElement("tr",null,o.a.createElement("th",{scope:"row"},o.a.createElement("label",{for:"api_key"},"Api key (required)")),o.a.createElement("td",null,o.a.createElement("input",{name:"api_key",id:"api_key",type:"text",className:"regular-text",autocomplete:"off",value:p,onChange:function(e){return h(e.target.value)}}))),o.a.createElement("tr",null,o.a.createElement("th",{scope:"row"},o.a.createElement("label",{for:"secret_key"},"Secret key (required)")),o.a.createElement("td",null,o.a.createElement("input",{name:"secret_key",id:"secret_key",className:"regular-text",autocomplete:"off",value:u,onChange:function(e){return s(e.target.value)}}))),b&&o.a.createElement("div",{className:"error settings-error"},o.a.createElement("p",null,b)),S&&o.a.createElement("div",{className:"notice notice-success"},o.a.createElement("p",null,S))),o.a.createElement("p",{class:"submit"},o.a.createElement("input",{type:"submit",name:"submit",id:"submit",class:"button button-primary",value:"Save Changes"}))),o.a.createElement("h2",null,"Auto Installation"),o.a.createElement(f,{title:"Automatically add the 'Login with Heslo' to your login page",fnChange:function(e){y(e?"true":"false")},checked:"true"===g}),o.a.createElement("p",{class:"submit"},o.a.createElement("input",{type:"submit",name:"submit",id:"submit",class:"button button-primary",value:"Save Changes",onClick:P})),_&&o.a.createElement("div",{className:"notice notice-success"},o.a.createElement("p",null,_)),o.a.createElement("h2",null,"Custom Installation"),o.a.createElement("p",null,o.a.createElement("label",{for:"custom_installation"},o.a.createElement("input",{type:"text",name:"custom_installation",id:"custom_installation",value:"[heslo_login]",disabled:"disabled",class:"regular-text"}),o.a.createElement("p",{class:"description",id:"tagline-description"}," Copy & Paste the following code where you want the Heslo button to appear."))))},p=document.getElementById("heslo-login-settings"),h=window.heslo_login_ajax,v=h.urls,g=void 0===v?{}:v,y=h.nonce,m=void 0===y?"":y;p&&a.a.render(o.a.createElement(d,{nonce:m,urls:g}),p)}]); -
heslo-login/trunk/heslo-login.php
r2545137 r2560331 4 4 * Plugin URI: https://github.com/getheslo/wordpress-heslo-login 5 5 * Description: Passwordless login for your users using Touch and Face ID 6 * Version: 1.0. 06 * Version: 1.0.2 7 7 * Author: Heslo 8 8 * Author URI: https://www.getheslo.com … … 46 46 { 47 47 $client_key = get_option('heslo_login_client_key'); 48 $js_to_load = heslo_login_is_local_dev() ? 'http://localhost:3000/login/script' :'https://channel-api.getheslo.com/login/script';48 $js_to_load = 'https://channel-api.getheslo.com/login/script'; 49 49 50 50 $args = array( 51 51 'application_client_id' => $client_key, 52 52 ); 53 wp_enqueue_script('heslo_widget_script', esc_url(add_query_arg($args, $js_to_load)), '', time() , true);53 wp_enqueue_script('heslo_widget_script', add_query_arg($args, $js_to_load), '', time() , true); 54 54 } 55 55 … … 142 142 function heslo_login_auth($request) 143 143 { 144 $metadata = heslo_login_ is_local_dev() ? heslo_login_http('http://localhost:9000/.well-known/openid-configuration') : heslo_login_http('https://api.getheslo.com/.well-known/openid-configuration');144 $metadata = heslo_login_http('https://api.getheslo.com/.well-known/openid-configuration'); 145 145 146 146 $identifier = sanitize_text_field($_GET['identifier']); … … 160 160 function heslo_login_auth_callback($request) 161 161 { 162 $metadata = heslo_login_ is_local_dev() ? heslo_login_http('http://localhost:9000/.well-known/openid-configuration') : heslo_login_http('https://api.getheslo.com/.well-known/openid-configuration');162 $metadata = heslo_login_http('https://api.getheslo.com/.well-known/openid-configuration'); 163 163 164 164 $client_key = get_option('heslo_login_client_key'); -
heslo-login/trunk/readme.txt
r2545170 r2560331 5 5 Tested up to: 5.7.2 6 6 Requires PHP: 7.0 7 Stable tag: 1.0. 17 Stable tag: 1.0.2 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html -
heslo-login/trunk/src/admin/admin-index.js
r2545137 r2560331 59 59 const baseUrl = new URL(urls.callback); 60 60 61 const firstPath = baseUrl.pathname.split('/')[1]; 62 const suffix = firstPath === 'wp-json' ? '' : `/${firstPath}`; 61 63 return ( 62 64 <div> … … 65 67 <ol> 66 68 <li>Create a <b><a href='https://dashboard.getheslo.com?redirect_page=applications' target='_blank'>Heslo account</a></b></li> 67 <li>Create a wordpress application. Use <b>{baseUrl.origin} </b> when prompted for the base url</li>69 <li>Create a wordpress application. Use <b>{baseUrl.origin}{suffix}</b> when prompted for the base url</li> 68 70 <li>Copy and paste the generated client and secret keys below</li> 69 71 </ol>
Note: See TracChangeset
for help on using the changeset viewer.