takeTokenFromUrl
function takeTokenFromUrl(location, replace): string | null;Defined in: src/ui/token.ts:15
Read a portal token from #token= (preferred) or ?token=, and strip it from the URL through
replace (e.g. (url) => history.replaceState(null, "", url)). Other query and hash parameters
are kept. Returns the token, or null when the URL carries none (nothing is replaced then).
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
location |
Pick<Location, "hash" | "search" | "pathname"> |
replace |
(url) => void |
Returns
Section titled “Returns”string | null