update
Showing
1 changed file
with
0 additions
and
26 deletions
| ... | @@ -28,32 +28,6 @@ | ... | @@ -28,32 +28,6 @@ |
| 28 | --> | 28 | --> |
| 29 | <title>AI-Pro ChatGPT</title> | 29 | <title>AI-Pro ChatGPT</title> |
| 30 | <script src='%REACT_APP_BTUTIL_AUTH_URL%/ext-app/js/btutil-authenticate-v2.min.js'></script> | 30 | <script src='%REACT_APP_BTUTIL_AUTH_URL%/ext-app/js/btutil-authenticate-v2.min.js'></script> |
| 31 | <script> | ||
| 32 | let aiUser = btutil_getCookie('aiwp_logged_in'); | ||
| 33 | if(!aiUser) { | ||
| 34 | window.location.href = '%REACT_APP_AUTH_FAILED_REDIRECTION_URL%'; | ||
| 35 | } else { | ||
| 36 | let objBody = { aiwp_logged_in: aiUser }; | ||
| 37 | |||
| 38 | let params = []; | ||
| 39 | params['objBody'] = objBody; | ||
| 40 | params['strUrl'] = '%REACT_APP_EXTERNAL_API_URL%/e/v1/authenticate/'; | ||
| 41 | |||
| 42 | btutil_checkAuthentication(params, cbCheckAuthentication, cbErrCheckAuthentication); | ||
| 43 | function cbCheckAuthentication(res) { | ||
| 44 | // console.log(res); | ||
| 45 | if (!res.success) { | ||
| 46 | window.location.href = '%REACT_APP_AUTH_FAILED_REDIRECTION_URL%'; | ||
| 47 | } else { | ||
| 48 | document.getElementById("root").classList.add("active"); | ||
| 49 | } | ||
| 50 | } | ||
| 51 | |||
| 52 | function cbErrCheckAuthentication(res) { | ||
| 53 | console.log(res); | ||
| 54 | } | ||
| 55 | } | ||
| 56 | </script> | ||
| 57 | </head> | 31 | </head> |
| 58 | <body> | 32 | <body> |
| 59 | <noscript>You need to enable JavaScript to run this app.</noscript> | 33 | <noscript>You need to enable JavaScript to run this app.</noscript> | ... | ... |
-
Please register or sign in to post a comment