Hey, I just ran into this exact same problem 369 days after your original post!
I found out that the error, at least on my side, was occurring because my
name method (or attribute? I’m new to Ruby) needed to return the all lowercase name of the OmniAuth strategy it registers in
In my case, it was returning the capitalized name of the OmniAuth strategy, so the code in
Users::OmniauthCallbacksController#complete didn’t find my authenticator, which is what kicked off the 403. As soon as I made it all lowercase, everything worked.
I suspect this may be either a bug in Discourse or suboptimal API design since it seems to violate the Don’t Repeat Yourself (DRY) principle, but as I said, I’m new to Ruby and Rails and all this stuff so I have no idea.
Anyways, I hope you or someone else who stumbles across this thread finds this useful.