1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[42],{1767:function(e,n,t){"use strict";var o=t(67294),r=t(85893),a={auto:"",xs:"h-7 px-4 text-sm",sm:"h-8 px-4 text-sm",md:"h-10 px-4 text-base",lg:"h-11 px-5 text-base",xl:"h-12 px-8 text-base"},i={xs:"h-7 w-7 text-sm",sm:"h-8 w-8 text-sm",md:"h-10 w-10 text-base",lg:"h-11 w-11 text-base",xl:"h-12 w-12 text-base"},l=(0,o.forwardRef)((function(e,n){var{id:t,name:o,children:l,type:s="button",size:c="",background:d="bg-primary hover:bg-primary/90 border-primary",rounded:u="rounded-full",textClass:g="text-white",className:h="",outline:m=!1,border:b,disabled:x=!1,onClick:p,icon:f=!1,iconRounded:w="full",loading:y=!1}=e,v=["inline-flex items-center justify-center font-semibold focus:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 transition-colors disabled:opacity-60 disabled:cursor-not-allowed text-nowrap",f?c in i?i[c]:i.md:c in a?a[c]:a.md,f?"sm"===w?"rounded-md":"rounded-full":u,m?"bg-transparent border border-solid hover:bg-transparent":"",g,d,h].filter(Boolean).join(" ");return(0,r.jsx)("button",{ref:n,id:t,name:o,type:s,"aria-label":o,className:v,disabled:x||y,onClick:p,children:y?(0,r.jsx)("div",{className:"w-5 h-5 border-2 ".concat(b||"border-white"," rounded-full animate-spin")}):l})}));n.Z=(0,o.memo)(l)},20085:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return b}});var o=t(50029),r=t(67294),a=t(9008),i=t.n(a),l=t(12241),s=t(1767),c=t(35231),d=t(61971),u=t(85893),g=d.Z.oauth.domain,h=d.Z.aws_user_pools_web_client_id;function m(){return(m=(0,o.Z)((function*(e){var n=(new TextEncoder).encode(e),t=yield crypto.subtle.digest("SHA-256",n);return btoa(String.fromCharCode(...new Uint8Array(t))).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}))).apply(this,arguments)}function b(){var{language:e}=(0,c.ZK)(),{0:n,1:t}=(0,r.useState)(null),a=function(){var e=(0,o.Z)((function*(e){t(e);var n=function(){var e=new Uint8Array(32);return crypto.getRandomValues(e),btoa(String.fromCharCode(...e)).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}(),o=yield function(e){return m.apply(this,arguments)}(n),r=function(){var e=new Uint8Array(16);return crypto.getRandomValues(e),btoa(String.fromCharCode(...e)).replace(/[^a-zA-Z0-9]/g,"")}(),a=(()=>{var e=(0,l.dU)();return"DEV"===e||"PROD"===e?"https://www.lugelo.com/extension-auth-complete":"".concat(window.location.origin,"/extension-auth-complete")}
1)();sessionStorage.setItem("pkce_code_verifier",n),sessionStorage.setItem("pkce_state",r);var i="https://".concat(g,"/oauth2/authorize")+"?client_id=".concat(encodeURIComponent(h))+"&redirect_uri=".concat(encodeURIComponent(a))+"&response_type=code"+"&scope=".concat(encodeURIComponent("openid profile email"))+"&state=".concat(encodeURIComponent(r))+"&code_challenge=".concat(encodeURIComponent(o))+"&code_challenge_method=S256"+(e?"&identity_provider=".concat(encodeURIComponent(e)):"");window.location.href=i}));return function(n){return e.apply(this,arguments)}}();return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)(i(),{children:[(0,u.jsx)("title",{children:"Browser Extension Authentication \u2013 Lugelo"}),(0,u.jsx)("meta",{name:"description",content:"Authenticate your Lugelo browser extension to start journaling from anywhere on the web."}),(0,u.jsx)("meta",{name:"robots",content:"noindex, nofollow"})]}),(0,u.jsx)("div",{className:"w-full min-h-screen bg-gray-100 flex flex-col dark:bg-black relative justify-center overflow-hidden",children:(0,u.jsx)("div",{className:"w-full h-full flex items-center justify-center",children:(0,u.jsxs)("div",{className:"bg-white dark:bg-md-black dark:border dark:border-gray-800 w-[90%] max-w-md mx-auto p-8 rounded-lg shadow-lg absolute z-20 ",children:[(0,u.jsxs)("div",{className:"text-center mb-8",children:[(0,u.jsx)("img",{src:"/assets/images/logo.svg",width:"100",height:"48",alt:"Lugelo",className:"mx-auto mb-4"}),(0,u.jsx)("h1",{className:"font-bold text-2xl text-gray-900 dark:text-white",children:e.ExtensionHeading}),(0,u.jsx)("p",{className:"text-base text-gray-600 dark:text-gray-300",children:e.ExtensionDescription})]}),(0,u.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,u.jsx)(s.Z,{onClick:()=>a("Google"),loading:"Google"===n,disabled:n&&"Google"!==n,className:"w-full",background:"bg-[#db4437] hover:bg-red-700",children:"Google"===n?"Redirecting...":"Login with Google"}),(0,u.jsx)(s.Z,{onClick:()=>a("Facebook"),loading:"Facebook"===n,disabled:n&&"Facebook"!==n,className:"w-full",background:"bg-[#1877F2] hover:bg-blue-600",children:"Facebook"===n?"Redirecting...":"Login with Facebook"}),(0,u.jsx)(s.Z,{onClick:()=>a("SignInWithApple"),loading:"SignInWithApple"===n,disabled:n&&"SignInWithApple"!==n,className:"w-full",background:"bg-black dark:bg-white hover:bg-gray-800 dark:hover:bg-gray-200",children:"SignInWithApple"===n?"Redirecting...":"Login with Apple"})]}),(0,u.jsxs)("p",{className:"mt-6 text-xs text-center text-gray-500 dark:text-gray-400",children:[e.bySigningIn," ",(0,u.jsx)("a",{href:"/terms",target:"_blank",className:"underline font-semibold",children:e.terms})," ","&"," ",(0,u.jsx)("a",{href:"/privacy",target:"_blank",className:"underline font-semibold",children:e.privacyPolicy})]})]})})})]})}},88888:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/extension-auth",function(){return t(20085)}])}},function(e){e.O(0,[9774,2089,2888,179],(function(){return n=88888,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.