Taha ÇEKEN
09/08/2025, 6:10 AM/allowed_url endpoint?Ask Inkeep
09/08/2025, 6:10 AMAsk Inkeep
09/08/2025, 6:10 AMcode query parameter they send after login
Here's the recommended approach from the documentation :
// frontend/app.mjs
if (searchParams.get("code") !== null) {
//...
const syncUser = await fetch("api/sync", {
method: "POST",
headers: new Headers({ Authorization: `Bearer ${tokens.access_token}` }) ,
}) ;
//...
}
Your pre-token generation stage aligns with the recommended practice of syncing "during the login process, as soon as a user's identity is verified" (3) .
Lambda Authorizer Options
For checking permissions with URL mapping, you should use the /allowed_url endpoint on the PDP (1) . Here's the documented approach:
curl --location '<http://localhost:7766/allowed_url>' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer permit_key_{your_key}' \
--data '{
"user": {
"key": "<mailto:raz@permit.io|raz@permit.io>"
},
"url": "<https://example.com/endpoint?param=value>",
"http_method": "POST",
"tenant": "default"
}'
The /allowed_url endpoint is specifically designed for URL-based permission checks and is supported in PDP version 0.2.19 or higher .Ask Inkeep
09/08/2025, 6:11 AMTaha ÇEKEN
09/08/2025, 6:17 AMAlon Boshi
09/08/2025, 7:40 AMAlon Boshi
09/08/2025, 10:05 AMTaha ÇEKEN
09/08/2025, 12:33 PMAlon Boshi
09/08/2025, 12:46 PMAlon Boshi
09/08/2025, 1:01 PMTaha ÇEKEN
09/09/2025, 5:44 AMAlon Boshi
09/09/2025, 6:51 AMAlon Boshi
09/09/2025, 8:20 AMTaha ÇEKEN
09/09/2025, 8:35 AMAlon Boshi
09/16/2025, 10:45 AMTaha ÇEKEN
09/16/2025, 11:35 AM