This commit is contained in:
wrzesinski-hubert
2020-12-10 21:51:01 +01:00
parent b6121a5eee
commit 8ba07f5c07
4 changed files with 10 additions and 12 deletions

View File

@ -30,12 +30,12 @@ export const CASProvider = ({ children }: CASProviderProps) => {
sessionStorage.setItem('userToken', token.token);
sessionStorage.setItem('userPrivilage', token.authorityRole)
}
const tokenik:any = JSON.parse(sessionStorage.getItem('userToken')as string);
const tokenTMP:any = JSON.parse(sessionStorage.getItem('userToken')as string);
const token: Token = {
authorityRole: tokenik.authorityRole,
email: tokenik.email,
id: tokenik.id,
token: tokenik.token,
authorityRole: tokenTMP.authorityRole,
email: tokenTMP.email,
id: tokenTMP.id,
token: tokenTMP.token,
};
setToken(token.token);
} catch (e) {