I’m wanting to call an API every time a user logs in, to assign them to (or remove them from) various groups. The way I’m currently doing it is with a fork of the Persona authentication plugin, by tacking it on to the end of the existing after_authenticate function.
Is it possible to do this after authentication no matter what login method a user uses? Or is there some other way to achieve the same effect?
Any help will be greatly appreciated