const o = "accessToken", r = "accessTokenExpiredAt", c = "refreshToken", s = "redirectUri", a = () => localStorage.getItem(o) ?? sessionStorage.getItem(o) ?? "", n = (e) => localStorage.getItem(e) ?? sessionStorage.getItem(e) ?? "", l = (e, t = {}) => {
  localStorage.setItem(o, e), localStorage.setItem(r, t.accessTokenExpiredAt ?? "0"), localStorage.setItem(c, t.refreshToken ?? ""), t.redirectUri && localStorage.setItem(s, t.redirectUri);
}, g = () => {
  localStorage.removeItem(o), localStorage.removeItem(r), localStorage.removeItem(c), localStorage.removeItem(s);
};
export {
  a as getAccessToken,
  n as getAccessTokenInfo,
  g as removeAccessToken,
  l as setAccessToken
};
