I open-sourced the code for my Spotify plugin and wrote a step by step tutorial for how to set everything up. Hopefully, it can be useful for other developers to learn how to give ChatGPT access to third-party service via OAuth.
Feedback and contributions are welcome!