PageSourceSearch

https://localclubhub.com/build/assets/TwoFactorAuthenticationForm-6b462d45.js

js localclubhub.com collected 2026-10-06 13:31:30 UTC 7,196 bytes, 1 lines download raw bytes

1import{r as p,x as H,o as t,d as a,a as l,p as N,b as s,w as o,f as r,t as C,s as R,n as x,m as O,T as Q,j as Y,y as D,c as h,u as y,e as u,F as I,g as U,K as j,O as P}from"./app-5dbcd504.js";import{_ as z}from"./Modal-83784a8f.js";import{_ as G}from"./DialogModal-2137fde3.js";import{_ as B,a as L}from"./TextInput-947ece32.js";import{_ as $}from"./PrimaryButton-3fa815ca.js";import{_ as T}from"./SecondaryButton-1a80cc22.js";import{_ as W}from"./DangerButton-525fffd5.js";import{_ as J}from"./InputLabel-8b9db90d.js";import"./SectionTitle-22df8fd6.js";import"./_plugin-vue_export-helper-c27b6911.js";const X={class:"mt-4"},g={__name:"ConfirmsPassword",props:{title:{type:String,default:"Confirm Password"},content:{type:String,default:"For your security, please confirm your password to continue."},button:{type:String,default:"Confirm"}},emits:["confirmed"],setup(w,{emit:b}){const c=p(!1),e=H({password:"",error:"",processing:!1}),i=p(null),v=()=>{axios.get(route("password.confirmation")).then(n=>{n.data.confirmed?b("confirmed"):(c.value=!0,setTimeout(()=>i.value.focus(),250))})},_=()=>{e.processing=!0,axios.post(route("password.confirm"),{password:e.password}).then(()=>{e.processing=!1,d(),O().then(()=>b("confirmed"))}).catch(n=>{e.processing=!1,e.error=n.response.data.errors.password[0],i.value.focus()})},d=()=>{c.value=!1,e.password="",e.error=""};return(n,m)=>(t(),a("span",null,[l("span",{onClick:v},[N(n.$slots,"default")]),s(G,{show:c.value,onClose:d},{title:o(()=>[r(C(w.title),1)]),content:o(()=>[r(C(w.content)+" ",1),l("div",X,[s(B,{ref_key:"passwordInput",ref:i,modelValue:e.password,"onUpdate:modelValue":m[0]||(m[0]=S=>e.password=S),type:"password",class:"mt-1 block w-3/4",placeholder:"Password",autocomplete:"current-password",onKeyup:R(_,["enter"])},null,8,["modelValue","onKeyup"]),s(L,{message:e.error,class:"mt-2"},null,8,["message"])])]),footer:o(()=>[s(T,{onClick:d},{default:o(()=>[r(" Cancel ")]),_:1}),s($,{class:x(["ml-3",{"opacity-25":e.processing}]),disabled:e.processing,onClick:_},{default:o(()=>[r(C(w.button),1)]),_:1},8,["class","disabled"])]),_:1},8,["show"])]))}},Z={key:0,class:"text-lg font-medium text-gray-900 dark:text-gray-100"},ee={key:1,class:"text-lg font-medium text-gray-900 dark:text-gray-100"},te={key:2,class:"text-lg font-medium text-gray-900 dark:text-gray-100"},oe=l("div",{class:"mt-3 max-w-xl text-sm text-gray-600 dark:text-gray-400"},[l("p",null," When two factor authentication is enabled, you will be prompted for a secure, random token during authentication. You may retrieve this token from your phone's Google Authenticator application. ")],-1),ae={key:3},se={key:0},re={class:"mt-4 max-w-xl text-sm text-gray-600 dark:text-gray-400"},ne={key:0,class:"font-semibold"},le={key:1},ce=["innerHTML"],ie={key:0,class:"mt-4 max-w-xl text-sm text-gray-600 dark:text-gray-400"},ue={class:"font-semibold"},de=["innerHTML"],me={key:1,class:"mt-4"},fe={key:1},pe=l("div",{class:"mt-4 max-w-xl text-sm text-gray-600 dark:text-gray-400"},[l("p",{class:"font-semibold"}," Store these recovery codes in a secure password manager. They can be used to recover access to your account if your two factor authentication device is lost. ")],-1),_e={class:"grid gap-1 max-w-xl mt-4 px-4 py-4 font-mono text-sm bg-gray-100 dark:bg-gray-900 rounded-lg"},ye={class:"mt-5"},ve={key:0},he={key:1},Ke={__name:"TwoFactorAuthenticationForm",props:{requiresConfirmation:Boolean},setup(w){const b=w,c=p(!1),e=p(!1),i=p(!1),v=p(null),_=p(null),d=p([]),n=Q({code:""}),m=Y(()=>{var f;return!c.value&&((f=j().props.auth.user)==null?void 0:f.two_factor_enabled)});D(m,()=>{m.value||(n.reset(),n.clearErrors())});const S=()=>{c.value=!0,P.post(route("two-factor.enable"),{},{preserveScroll:!0,onSuccess:()=>Promise.all([M(),q(),F()]),onFinish:()=>{c.value=!1,e.value=b.requiresConfirmation}})},M=()=>axios.get(route("two-factor.qr-code")).then(f=>{v.value=f.data.svg}),q=()=>axios.get(route("two-factor.secret-key")).then(f=>{_.value=f.data.secretKey}),F=()=>axios.get(route("two-factor.recovery-codes")).then(f=>{d.value=f.data}),K=()=>{n.post(route("two-factor.confirm"),{errorBag:"confirmTwoFactorAuthentication",preserveScroll:!0,preserveState:!0,onSuccess:()=>{e.value=!1,v.value=null,_.value=null}})},E=()=>{axios.post(route("two-factor.recovery-codes")).then(()=>F())},V=()=>{i.value=!0,P.delete(route("two-factor.disable"),{preserveScroll:!0,onSuccess:()=>{i.value=!1,e.value=!1}})};return(f,A)=>(t(),h(z,null,{title:o(()=>[r(" Two Factor Authentication ")]),description:o(()=>[r(" Add additional security to your account using two factor authentication. ")]),content:o(()=>[y(m)&&!e.value?(t(),a("h3",Z," You have enabled two factor authentication. ")):y(m)&&e.value?(t(),a("h3",ee," Finish enabling two factor authentication. ")):(t(),a("h3",te," You have not enabled two factor authentication. ")),oe,y(m)?(t(),a("div",ae,[v.value?(t(),a("div",se,[l("div",re,[e.value?(t(),a("p",ne," To finish enabling two factor authentication, scan the following QR code using your phone's authenticator application or enter the setup key and provide the generated OTP code. ")):(t(),a("p",le," Two factor authentication is now enabled. Scan the following QR code using your phone's authenticator application or enter the setup key. "))]),l("div",{class:"mt-4 p-2 inline-block bg-white",innerHTML:v.value},null,8,ce),_.value?(t(),a("div",ie,[l("p",ue,[r(" Setup Key: "),l("span",{innerHTML:_.value},null,8,de)])])):u("",!0),e.value?(t(),a("div",me,[s(J,{for:"code",value:"Code"}),s(B,{id:"code",modelValue:y(n).code,"onUpdate:modelValue":A[0]||(A[0]=k=>y(n).code=k),type:"text",name:"code",class:"block mt-1 w-1/2",inputmode:"numeric",autofocus:"",autocomplete:"one-time-code",onKeyup:R(K,["enter"])},null,8,["modelValue","onKeyup"]),s(L,{message:y(n).errors.code,class:"mt-2"},null,8,["message"])])):u("",!0)])):u("",!0),d.value.length>0&&!e.value?(t(),a("div",fe,[pe,l("div",_e,[(t(!0),a(I,null,U(d.value,k=>(t(),a("div",{key:k}
1,C(k),1))),128))])])):u("",!0)])):u("",!0),l("div",ye,[y(m)?(t(),a("div",he,[s(g,{onConfirmed:K},{default:o(()=>[e.value?(t(),h($,{key:0,type:"button",class:x(["mr-3",{"opacity-25":c.value}]),disabled:c.value},{default:o(()=>[r(" Confirm ")]),_:1},8,["class","disabled"])):u("",!0)]),_:1}),s(g,{onConfirmed:E},{default:o(()=>[d.value.length>0&&!e.value?(t(),h(T,{key:0,class:"mr-3"},{default:o(()=>[r(" Regenerate Recovery Codes ")]),_:1})):u("",!0)]),_:1}),s(g,{onConfirmed:F},{default:o(()=>[d.value.length===0&&!e.value?(t(),h(T,{key:0,class:"mr-3"},{default:o(()=>[r(" Show Recovery Codes ")]),_:1})):u("",!0)]),_:1}),s(g,{onConfirmed:V},{default:o(()=>[e.value?(t(),h(T,{key:0,class:x({"opacity-25":i.value}),disabled:i.value},{default:o(()=>[r(" Cancel ")]),_:1},8,["class","disabled"])):u("",!0)]),_:1}),s(g,{onConfirmed:V},{default:o(()=>[e.value?u("",!0):(t(),h(W,{key:0,class:x({"opacity-25":i.value}),disabled:i.value},{default:o(()=>[r(" Disable ")]),_:1},8,["class","disabled"]))]),_:1})])):(t(),a("div",ve,[s(g,{onConfirmed:S},{default:o(()=>[s($,{type:"button",class:x({"opacity-25":c.value}),disabled:c.value},{default:o(()=>[r(" Enable ")]),_:1},8,["class","disabled"])]),_:1})]))])]),_:1}))}};export{Ke as default};

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.