nelsonprsousa
nelsonprsousa
Explore posts from servers
BABetter Auth
Created by palicz on 3/1/2025 in #help
Route based access control
const isCurrentUserAllowedToDeleteCategory = await auth.api.userHasPermission({
headers: request.headers,
body: {
userId: session?.user.id,
permission: {
category: ['delete'],
},
},
});
const isCurrentUserAllowedToDeleteCategory = await auth.api.userHasPermission({
headers: request.headers,
body: {
userId: session?.user.id,
permission: {
category: ['delete'],
},
},
});
5 replies
BABetter Auth
Created by palicz on 3/1/2025 in #help
Route based access control
I am currently getting the session and performing auth.api.userHasPermission() on the server.
5 replies
BABetter Auth
Created by nelsonprsousa on 2/14/2025 in #help
SyntaxError: Unexpected end of JSON input
No description
11 replies
BABetter Auth
Created by nelsonprsousa on 2/14/2025 in #help
SyntaxError: Unexpected end of JSON input
I believe it is something related with fastify... maybe this integration is not supported yet. The request that arrives is kinda weird, no email, no password, etc
11 replies
BABetter Auth
Created by nelsonprsousa on 2/14/2025 in #help
SyntaxError: Unexpected end of JSON input
Working directly with postman 🤔
11 replies
BABetter Auth
Created by nelsonprsousa on 2/14/2025 in #help
SyntaxError: Unexpected end of JSON input
No description
11 replies
BABetter Auth
Created by nelsonprsousa on 2/14/2025 in #help
SyntaxError: Unexpected end of JSON input
@bekacru do you think this could be related with better-call? 🤔
11 replies
BABetter Auth
Created by nelsonprsousa on 2/14/2025 in #help
SyntaxError: Unexpected end of JSON input
http://ip:port/api/auth/go returns ok
11 replies
BABetter Auth
Created by nelsonprsousa on 2/14/2025 in #help
SyntaxError: Unexpected end of JSON input
Also I am using an IP+port as an HOST, not sure if it is related
11 replies
BABetter Auth
Created by nelsonprsousa on 2/14/2025 in #help
SyntaxError: Unexpected end of JSON input
Locally against the same DB it works. hmm
11 replies
BABetter Auth
Created by nelsonprsousa on 2/14/2025 in #help
SyntaxError: Unexpected end of JSON input
It only happens in production 🤔 (http, no https or certificates)
11 replies
BABetter Auth
Created by nelsonprsousa on 2/14/2025 in #help
SyntaxError: Unexpected end of JSON input
I am accepting ways of debugging this
11 replies