saving magic token as a json