How much can discourse be customized via plugins?

AI-generated summary

Nikolay is looking to customize Discourse via plugins, specifically to create a custom SSO login handler and integrate with external services. Falco confirms that creating “backend” plugins is possible and easier with Ruby and Rails/Discourse plugin hooks. Falco provides examples of existing plugins, including a custom LinkedIn auth plugin and an Algolia plugin that interacts with an external server on post creation.

Nikolay attempts to create a plugin based on the LinkedIn auth example but encounters a routing error when clicking the login button on the login form. The error message reads “No route matches [POST] ‘/auth/myauth’.”

Hello everyone.
I want to change my community from IPB to Discourse.
I created plugin via basic plugin tutorial. I see that i am able to create frontend plugin.
But i am interested, is there a way to create backend plugins?
For example i want to create custom SSO login handler.
I want to create plugin that will on post creating get info from other server, or send info to some other service, like bigquery. Etc..
So, is it possible to make plugins like this using discourse plugin system?

Yes, and to be honest I consider “backend” plugins easier than “frontend” plugins as Ruby and Rails/Discourse plugin hooks make it so easy.

Example: GitHub - discourse/discourse-linkedin-auth: LinkedIn OAuth Login support for Discourse · GitHub

Example:

Thank you for reply. Ill check some plugins, to get sense how to write them.

Hello, i almost created plugin. I make it almost copy of this plugin example. But getting this error all time, and cant figure out how to fix it:

# Routing Error
## No route matches [POST] "/auth/myauth"
`Rails.root: /var/discourse`

Do you know what solution might be?

p.s. I am getting this error after clicking button “my login” on login form