PageSourceSearch

https://app.podfeed.ai/assets/signin-DM_YeUZ8.js

js podfeed.ai collected 2026-10-05 12:59:48 UTC 5,795 bytes, 1 lines download raw bytes

1import{a as N,d as z,u as B,M as U,c as _,r as O,aX as j,bZ as H,b_ as G,a7 as b,b$ as X,c0 as Q,c1 as Z,s as l,c2 as J,a4 as K,h as r,t as n,k as d,j as Y,g as c,i as s,f as x,a5 as ee,w as p,V as y,l as oe,W as re,a6 as te,aw as se,c3 as S,aj as ae,o as k,aa as ie}from"./index-BkB_U-f7.js";import{u as ne,t as le,o as de,s as V,a as $}from"./vee-validate-zod-CLqgbycY.js";import{V as E}from"./VTextField-BMftMJln.js";import{V as ce}from"./VSnackbar-DIY8Zud4.js";import"./index-WgIAkrQe.js";import"./index-ZG1W5MFq.js";import"./forwardRefs-DuIU1t2_.js";async function ue(g){const{data:t}=await N.get("/api/v1/enterprise-sso/discovery",{params:{email:g},headers:{"X-Skip-Loading":"true"}});return t}const me="podfeed.ai";function pe(){return me}function ge(g){const t=g.trim().toLowerCase();return t.includes("@")?t.endsWith(`@${pe()}`):!1}const fe={class:"login-container"},ve={class:"login-card"},_e={class:"title"},we={class:"subtitle"},be={class:"divider"},he={class:"register-text"},ye={class:"legal-text"},Se={href:"https://podfeed.ai/terms",target:"_blank",rel:"noopener noreferrer"},ke={href:"https://podfeed.ai/privacy",target:"_blank",rel:"noopener noreferrer"},Ve=["href"],$e=z({__name:"signin",setup(g){const{t}=B(),f=te(),A=se(),u=U(!1),P=new Set(["aol.com","gmail.com","hotmail.com","icloud.com","live.com","msn.com","outlook.com","proton.me","protonmail.com","yahoo.com"]),I=_(()=>{const o=window.location.hostname;return o.includes("podfeed.ai")&&!o.includes("tst")?"https://podfeed.ai":"https://tst.podfeed.ai"});O(()=>{const o=j(f.query);o&&H(o)});const{handleSubmit:M,meta:R,resetForm:T}=ne({validationSchema:le(de({email:V().email(t("validation_email")),password:V().optional()}))}),v=$("email"),m=$("password"),q=_(()=>(v.value.value||"").trim()),C=_(()=>(m.value.value||"").trim()),w=_(()=>ge(q.value));function F(o){const e=o.split("@").pop()?.trim().toLowerCase();return!!(e&&!P.has(e))}const h=M(async o=>{u.value=!0;try{if(w.value){const a=o.password?.trim()??"";if(!a){m.setErrors(t("required"));return}await G(o.email,a),b("login",{method:"password"});const i=X(),D=typeof f.query.redirect=="string"&&Q(f.query.redirect)?f.query.redirect:null;await A.push(i??D??"/app");return}let e=null;if(F(o.email))try{e=await ue(o.email)}catch(a){console.warn("Enterprise SSO discovery failed, falling back to email sign-in",a)}if(e?.provider){b("login",{method:`${e.provider.protocol}_sso`,organization_id:e.provider.organization_id}),await Z(e.provider.provider_id,e.provider.protocol);return}if(e?.sso_required){l.setAppSnackbar(t("enterprise_sso_required_unavailable"),"error");return}await J(o.email),T(),window.localStorage.setItem("emailForSignIn",o.email),l.setAppSnackbar(t("email_sent")),b("login",{method:"email"})}catch(e){let a;e.code==="auth/user-not-found"?a=t("error_user_not_found"):e.code==="auth/wrong-password"||e.code==="auth/invalid-credential"||e.code==="auth/invalid-login-credentials"?a=t("error_wrong_password"):e.code==="auth/too-many-requests"?a=t("error_too_many_requests"):a=t("error_generic"),console.error(a,e),l.setAppSnackbar(a,"error");return}finally{u.value=!1}});async function L(){try{await S("google")}catch(o){console.error("Failed signinRedirect",o),l.setAppSnackbar(t("error_generic"),"error")}}async function W(){try{await S("microsoft")}catch(o){console.error("Failed signinRedirect",o),l.setAppSnackbar(t("error_generic"),"error")}}return(o,e)=>{const a=ae("router-link");return k(),K(re,null,[r("div",fe,[r("div",ve,[r("h1",_e,n(o.$t("login_welcome_title")),1),r("p",we,n(o.$t("login_subtitle")),1),r("button",{class:"google-login",onClick:e[0]||(e[0]=i=>L())},[e[7]||(e[7]=r("img",{src:"https://www.svgrepo.com/show/355037/google.svg",alt:"Google Icon",class:"google-icon"},null,-1)),d(" "+n(o.$t("login_google_button")),1)]),r("button",{class:"microsoft-login",onClick:e[1]||(e[1]=i=>W())},[e[8]||(e[8]=r("img",{src:"https://www.svgrepo.com/show/452062/microsoft.svg",alt:"Microsoft Icon",class:"microsoft-icon"},null,-1)),d(" "+n(o.$t("login_microsoft_button")),1)]),r("div",be,[r("span",null,n(o.$t("login_or")),1)]),r("form",{class:"login-form",onSubmit:e[4]||(e[4]=Y((...i)=>s(h)&&s(h)(...i),["prevent"]))},[c(E,{modelValue:s(v).value.value,"onUpdate:modelValue":e[2]||(e[2]=i=>s(v).value.value=i),"error-messages":s(v).errorMessage.value,label:o.$t("email_label"),disabled:u.value,autocomplete:"username"},null,8,["modelValue","error-messages","label","disabled"]),w.value?(k(),x(E,{key:0,modelValue:s(m).value.value,"onUpdate:modelValue":e[3]||(e[3]=i=>s(m).value.value=i),"error-messages":s(m).errorMessage.value,label:o.$t("password_label"),disabled:u.value,type:"password",autocomplete:"current-password"},null,8,["modelValue","error-messages","label","disabled"])):ee("",!0),c(y,{class:"mt-4",type:"submit",color:"primary",disabled:!s(R).valid||u.value||w.value&&!C.value,block:""},{default:p(()=>
1[d(n(o.$t("login_button")),1)]),_:1},8,["disabled"])],32),r("p",he,[d(n(o.$t("login_no_account"))+" ",1),c(a,{to:"/signup"},{default:p(()=>[d(n(o.$t("signup_here")),1)]),_:1})]),r("p",ye,[r("a",Se,n(o.$t("terms_of_service")),1),e[9]||(e[9]=d(" · ")),r("a",ke,n(o.$t("privacy_policy")),1)])]),r("a",{href:I.value,class:"info-link",target:"_blank",rel:"noopener noreferrer"},[c(oe,{icon:"mdi-open-in-new",size:"small"}),e[10]||(e[10]=d(" Learn more about Podfeed "))],8,Ve)]),c(ce,{modelValue:s(l).appSnackbar.show,"onUpdate:modelValue":e[6]||(e[6]=i=>s(l).appSnackbar.show=i),color:s(l).appSnackbar.color,timeout:1e4},{actions:p(()=>[c(y,{variant:"text",onClick:e[5]||(e[5]=i=>s(l).appSnackbar.show=!1)},{default:p(()=>[d(n(o.$t("close_button")),1)]),_:1})]),default:p(()=>[d(n(o.$t(s(l).appSnackbar.text))+" ",1)]),_:1},8,["modelValue","color"])],64)}}}),qe=ie($e,[["__scopeId","data-v-b4a683d5"]]);export{qe 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.