Custom claims not added to access_token nor id_token

Hi, I was trying to add user email to access token, but when I log in using getTokenSilently from auth0-spa-js I don’t get it.
This is my rule:

function (user, context, callback) {
    const namespace = '';
    context.accessToken[namespace+'email'] =;

  callback(null, user, context);

And this is what I get in access_token’s payload after decode using

{”: “admin”,
“iss”: “”,
“sub”: “google-oauth2|--------”,
“aud”: [”,
“iat”: ------,
“exp”: ------,
“azp”: “--------”,
“scope”: “openid profile email”,
“permissions”: [