Add OTP login page and auth guard for client cabinet
This commit is contained in:
@@ -3,6 +3,7 @@ export default defineEventHandler(async (event) => {
|
||||
const body = await readBody(event);
|
||||
|
||||
const cookie = getHeader(event, 'cookie');
|
||||
const authorization = getHeader(event, 'authorization');
|
||||
const userId = getHeader(event, 'x-user-id');
|
||||
|
||||
const response = await fetch(config.backendGraphqlUrl, {
|
||||
@@ -10,6 +11,7 @@ export default defineEventHandler(async (event) => {
|
||||
headers: {
|
||||
'content-type': 'application/json',
|
||||
...(cookie ? { cookie } : {}),
|
||||
...(authorization ? { authorization } : {}),
|
||||
...(userId ? { 'x-user-id': userId } : {}),
|
||||
},
|
||||
body: JSON.stringify(body),
|
||||
|
||||
Reference in New Issue
Block a user