Non-standard third party oauth with meteor accounts

Noob here.

I know its quite easy to create a third party login system for popular services like facebook, twitter etc.

I would like to create a third party login system for a more obscure service that doesn’t have an existing login package, that hooks into the meteor accounts packages.

I have tried to replicate the code from the facebook login package, but it doesn’t work. Plus even if it worked i’d prefer to actually understand what the code is doing.

I also went through some general oauth2 tutorials, but haven’t been able to figure out how to create a meteor package to create a whole new third party oauth system.

Are there any tutorials that walk you through hooking your meteor app to a third party login provider? (all the one’s that i have seen just say “hey, meteor magic! just add the pre-existing login package to your app.” But i need to create a login package from scratch)

Or is there any blog post that explains in detail how the facebook/twitter login packages for meteor work?

Any help would be greatly appreciated!

I’m not aware of any tutorial but here’s a 3rd party Instagram accounts package that may be helpful: https://github.com/yubozhao/meteor-accounts-instagram