MCPcopy Create free account
hub / github.com/dailydotdev/apps / logout

Function logout

packages/shared/src/contexts/AuthContext.tsx:103–117  ·  view source on GitHub ↗
(reason: string)

Source from the content-addressed store, hash-verified

101export const REGISTRATION_PATH = '/register';
102
103export const logout = async (reason: string): Promise<void> => {
104 await dispatchLogout(reason);
105 const params = getQueryParams();
106 if (params.redirect_uri) {
107 window.location.replace(params.redirect_uri);
108 } else if (window.location.pathname === REGISTRATION_PATH) {
109 window.location.replace(process.env.NEXT_PUBLIC_WEBAPP_URL);
110 }
111
112 if (isExtension) {
113 window.location.reload();
114 } else {
115 window.location.replace('/onboarding');
116 }
117};
118
119export function checkIfGdprCovered(geo?: Boot['geo']): boolean {
120 return (

Callers 5

useAccountPageItemsFunction · 0.90
closeAndLogoutFunction · 0.50
ProfileMenuFunction · 0.50
SidebarProfileButtonFunction · 0.50
FooterFunction · 0.50

Calls 3

getQueryParamsFunction · 0.85
replaceMethod · 0.80
reloadMethod · 0.80

Tested by

no test coverage detected