mirror of
https://github.com/PretendoNetwork/website.git
synced 2026-09-26 18:46:39 -05:00
feat: add support for refresh tokens in internal stores
This commit is contained in:
@@ -20,10 +20,7 @@ export function getAuthContext(event: H3Event): AuthContext | null {
|
||||
export function enforceLoggedIn(event: H3Event): AuthContext {
|
||||
const context = getAuthContext(event);
|
||||
if (!context) {
|
||||
throw createError({
|
||||
status: 401,
|
||||
message: 'This action requires authentication'
|
||||
});
|
||||
throw createApiError('UNAUTHENTICATED');
|
||||
}
|
||||
return context;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user