Ready to post? First, try searching for your answer.
I have created action like this
exports.onExecutePostLogin = async (event, api) => {
if (event.authorization) {
const id = event.user.user_id;
api.accessToken.setCustomClaim(‘tl_id’, id);
}
};
But when I request accessToken like this I can’t see tl_id in my accessToken
export const getAuth0ManagementApiToken = async () => {
const options = {
method: “POST”,
url: ${process.env.AUTH0_ISSUER_BASE_URL}/oauth/token
,
headers: { “content-type”: “application/x-www-form-urlencoded” },
data: new URLSearchParams({
grant_type: “client_credentials”,
client_id: process.env.AUTH0_CLIENT_ID ?? “”,
client_secret: process.env.AUTH0_CLIENT_SECRET ?? “”,
audience: ${process.env.AUTH0_ISSUER_BASE_URL}/api/v2/
,
}),
};
const req = await axios.request(options);
return req.data;
};