Start a new topic

How to catch user at login to perform some BL

I can catch a user when he registeres with the onPostSave or onPreSave. But I cannot seem to "catch" him when he is logging in. First, when I click on a user, I see the record have been changed when the user logs in (I see "Last modified" is changed to current time). Should not onPostSave or onPreSave catch it when the record is updated? Have also tried onPostFetch/onPreFetch... Any help much appreciated!

Hi @edorf‌, what would you like to do once you've "caught" the user? Knowing the use case we can likely provide better advice about what BL code to run.
Well, my use case is that I have right now is to login the user also on another server automatically when he logs in on Kinvey (, the great search database), and I specifically need to generate a special key based on certain parameters from the Kinvey user-info, which I will return to the user (my app) which in turn do the actual login on Algolia using this key. But my question is really very general, perhaps I need to do some other BL work (anything that BL can do) when the user logs in...
Okay, that helps, thanks! While I find an engineer to help, have you seen the [BL reference guide]( "BL reference guide")?
Yes, of course, and searched this forum and also consulting the good friend Google... Thanks a lot!
Kinvey doesn't support BL hooks on login, unfortunately, but it is a good idea for a feature request.

Regarding your specific use case, this type of functionality is achievable by using an Auth Link. (We have an example of an Auth Link using LDAP [here.]( "here."))
Ok, thanks! Actually, just though of a another solution, though (for other readers that might find it interesting). I create a Custom Endpoint with the logic I need and then call this from the client. Solves my problem. Thanks a lot for your help!
Login or Signup to post a comment