Possible to create a Sign in with Ghost plugin for Discourse?

I’ve been told “No, Ghost isn’t exactly designed to be an IDP”. That being so, do plugins allow for adding new endpoints, making that route possible?

Edit:

Can groups be defined by the plugin so that (assuming that Ghost will send webhooks) when a user’s subscription changes groups can be synced?