In case you need a full-fledged more complex implementation of token-based authorization, you can use lexik/jwt-authentication-bundle. It has been tested in combination with this bundle and has proven itself to be quite good.
Installation and configuration is done according to the instructions for the bundle lexik/jwt-authentication-bundle
no special manipulations are required, everything should work out of the box.