authelia/web/src/utils/IdentityToken.ts

7 lines
257 B
TypeScript

import queryString from "query-string";
export function extractIdentityToken(locationSearch: string) {
const queryParams = queryString.parse(locationSearch);
return queryParams && "token" in queryParams ? (queryParams["token"] as string) : null;
}