update sso

This commit is contained in:
2021-07-30 17:49:08 +05:30
parent 89d57790af
commit 43234bade1
11 changed files with 17 additions and 32 deletions

View File

@ -22,15 +22,6 @@ const TheContent = () => {
const [SsoSession, setSsoSession] = useState('');
// useEffect(() => {
// async function fetchData() {
// // You can await here
// const result = await axios('https://fsbsso.sumasen.net/Shibboleth.sso/Session');
// setSsoSession(result.data);
// }
// fetchData();
// }, []);
async function fetchSession() {
// You can await here
const result = await axios('https://fsbsso.sumasen.net/Shibboleth.sso/Session');
@ -43,9 +34,9 @@ const TheContent = () => {
const shib = cookies.get('_shibsession_64656661756c7468747470733a2f2f66736273736f2e73756d6173656e2e6e65742f73686962626f6c657468')
if(shib !== undefined) {
fetchSession().then(() => {
console.log(shib);
console.log(SsoSession);
console.log(SsoSession.includes('Session Expiration'));
//console.log(shib);
//console.log(SsoSession);
//console.log(SsoSession.includes('Session Expiration'));
if(SsoSession.includes('Session Expiration')){
return true;
}