Prevent access to user pages when not logged in [v2] (#8904)
* do not throw error when navigating * enhance: add loginRequired to router This allows client pages to require logging in before displaying the page, useful for example for user settings pages. * add login requirements Co-authored-by: Andreas Nedbal <git@pixelde.su>
This commit is contained in:
@@ -17,5 +17,5 @@ export function pleaseLogin(path?: string) {
|
||||
},
|
||||
}, 'closed');
|
||||
|
||||
throw new Error('signin required');
|
||||
if (!path) throw new Error('signin required');
|
||||
}
|
||||
|
Reference in New Issue
Block a user