Discord linked roles

I am setting up a Ghost website with a paid membership, and I want to grant paid members an exclusive role on my Discord server. Discord has a new featured called Linked Roles that allows members to authenticate with third-party credentials to gain special roles on Discord. For example: connect a Twitter account with at least 1,000 followers > get a special role on Discord.

This is the flow members go through to gain a linked role:

  • Login to Discord
  • Go to the specified server and open the Linked Roles menu
  • Choose the role you want
  • Authenticate with your third-party credentials
  • Discord verifies you meet the criteria and grants the role

I am looking into building a Ghost integration that is hosted on Cloudflare Workers, but I am a novice when it comes to OAuth2 and authentication in general. Does anyone have advice on how I should approach this? Is it even feasible currently?

This would be a great feature to have natively. I’m hoping to offer a similar thing to members.