Change createToken function prototype