Quality, specialized two-part metal epoxy. Do not use superglue, or any other household grade glue, it degrades with time, or has different temperature expansion coefficient than metal and will crack with time. You must make sure the diametrically magnetized magnet is perfectly centered. I had a case where I bought a very expensive servo which misbehaved and when I opened it I discovered the magnet was off-center. Removing a glued magnet is nearly impossible because usually it involves heating which will immediately kill your Nd magnet, especially the cheap chinese ones, they turn into pumpkins at as low as 80oC (that’s lower than boiling water). Had to throw the servo away, because the magnet was so well glued inside the shaft I could not chisel it away without destroying the motor. Especially for motors, they get sometimes so hot, make sure you buy quality diametric magnets which can survive at least 100oC (boiling water). Buy a magnet, dunk it in boiling water, and check if it’s still good, better than gluing it first and finding it turns into a dud after a few days. Very common mistake.
As @JorgeMaker mentioned it may be a good idea to use a 3d printed insert, this way if you make a mistake, it’s trivial to pull the insert, scoop the magnet out with pliers and try again. And don’t heat the insert with a hot air gun to soften it, see #1. Also, 3d insert will give you the perfect center alignment.
Design your 3d and print it. May not be the answer you want but it’s the only one. There may be some holders out there on the multitude of 3d printing libraries, worth checking but this is so niche that i would be surprised if you find one that fits exactly your motor.
Many gumball motors come complete with a magnet, sensor and housing together, it may be best if you just buy the combo, it will save you a ton of headache. I am assuming you mean the angular hall sensors, not the three-hall sensored motors with the sensors inside the coils.
Perhaps, I tried that with other motors: on some motors the shaft is secured by a small screw, on others it is glued or shrinked into the outrunners “dome”.
For a 63mm BLDC I used a 20mm gimbal-motor with includes an AS5048 and mounted the both together back-to-back with two prop-mounts and some flexible axle in between.
I did as suggested by the very first post and it worked great. I just made a little 3d printed part, forced the magnet in to it’s hole with plumbing pliers, then forced the plastic bit into the motor. You should use petg, standard pla tends to crack over time with stress. Shoe goo can work as an adhesive, it is a rubber material after hardening so it will never crack and I think it’s butyl rubber so it’s good for longterm.
These things need to be “calibrated” for eccentricity etc due to inevitable misalignment of the magnet anyway so the mechanical imperfections are basically compensated for in software.