await fetch("https://kettleon.kinde.com/api/v1/organizations/${newOrgCode}/users",
{
method: 'POST',
body: JSON.stringify(userInputBody),
headers: headers
})
.then(function (res) {
return res.json();
});
organisation = newOrgCode
}
const { refreshTokens } = getKindeServerSession();
await refreshTokens();
refreshUser: privateProcedure.query(async ({ ctx, input }) => {
const { refreshTokens } = getKindeServerSession()
const tokens = (await refreshTokens()) as { accessToken: string, refreshToken: string };
console.log(tokens)
const{ getPermissions } = getKindeServerSession()
const permissions = (await getPermissions()) as KindePermissions | null;
console.log(permissions) // returns {permissions: [], orgCode: null}
return { data: permissions?.permissions, status: 200, success: true };
}),
(I'm not sure if I'm breaking some rules by asking too many questions on here? I'm really sorry if so)Definitely arent breaking any rules... the more questions the merrier!