Is it possible to set custom tokens for authentication?

I’m trying to work out how to use Ghost authentication to logon to a (unity) mobile app supporting my website, which uses a firebase backend.

The firebase docs say…

You can integrate Firebase Authentication with a custom authentication system by modifying your authentication server to produce custom signed tokens when a user successfully signs in.

Is it possible to do that with Ghost, or should I be looking for a different approach…?

Any pointers much appreciated!