Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
ignitetch
GitHub Repository: ignitetch/advphishing
Path: blob/master/sites/google-otp/otp_files/logout.d02c072b.js.download
739 views
"use strict";Vue.component("logout",{render:function(){var t=this,o=t.$createElement,e=t._self._c||o;return e("div",{staticClass:"logout__wrapper"},[t.owRegistry["ow-ajax"]?e("ow-ajax",{attrs:{url:"/api/logout",method:"POST",body:t.payload,trigger:t.triggerLogout},on:{success:t.logout}}):t._e(),t._v(" "),t.owRegistry["ow-toast"]?e("ow-toast",{attrs:{"toast-type":t.toast.type,content:t.toast.content,"show-toast":t.toast.show},on:{close:t.closeToast}}):t._e()],1)},staticRenderFns:[],name:"logout",data:function(){return{toast:{show:!1,type:"",content:""},payload:{liteParams:window.params},triggerLogout:"dormant"}},mounted:function(){this.triggerLogout="fire"},methods:{closeToast:function(){this.toast.show=!1,this.toast.type="",this.toast.content=""},logout:function(t){if(t.response)if("SUCCESS"===t.response.status)this.returnurl&&-1<window.owConfig.domainList.indexOf(this.extractHostname(this.returnurl))?window.location.href=this.returnurl:this.toast={show:!0,type:"warning",content:"Invalid domain"};else if("FAILURE"===t.response.status&&this.returnurl)if(this.returnurl&&-1<window.owConfig.domainList.indexOf(this.extractHostname(this.returnurl))){var o=this.returnurl;o=o.split("?")&&1<o.split("?").length?decodeURIComponent(o)+"&error=LogoutFailed":decodeURIComponent(o)+"?error=LogoutFailed",window.location.href=o}else this.toast={show:!0,type:"warning",content:"Invalid domain"}}},computed:{returnurl:function(){return this.$route.query&&this.$route.query.returnurl}}});
//# sourceMappingURL=../sourcemap/pages/logout.d02c072b.js.map