Add support for .generate_token method

for JS SDK