Triggering account creation/login on external service when a user logs in on discourse

Great, I’m excited to read that. I started looking at the sample skeleton plugin (GitHub - discourse/discourse-plugin-skeleton: Template for Discourse plugins) and was a bit underwhelmed because it has no documentation at all.

At first glance I need to ask: is this tutorial adding code to the base rails installation for discourse? I’m OK with doing that if that’s the official way, but it feels like this is dangerous and would be better handled as a plugin (which can easily be uninstalled, disabled). Also, don’t I have to worry this will break upgrades to discourse if my code is not in the github repo?

For example here:

Does this mean I really jump into the container (./launcher enter app) and then edit /var/www/app/controllers/snack_controller.rb?

And, I actually just followed those instructions. I cannot get the /admin/snack.json route to work, even after running ./launcher rebuild app.

This tutorial looks to be about eight years old. Is this really the correct way to do things?