fix(core): update
This commit is contained in:
8
ts/index.ts
Normal file
8
ts/index.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
import * as plugins from './webjwt.plugins.js';
|
||||
|
||||
export const getDataFromJwtString = <T = any>(jwtString: string): T => {
|
||||
const splitted = jwtString.split('.');
|
||||
const dataBase64 = splitted[1];
|
||||
// @ts-ignore
|
||||
return JSON.parse(atob(dataBase64));
|
||||
}
|
||||
Reference in New Issue
Block a user