thinktecture-ident-serverthinktecture

Where do I log application-logins in Thinktecture Identity Server v3


We have IdentityServer v3 with a custom UserService that handles two factor auth. We use it for many clients (webapps), and I would like to track the number of logins to the different applications.

I see that GetProfileDataAsync is called every time a user navigates to a new client (happens on every tab switch between webapps also). But I'm unable to track what client is actually causing the call.

Are there other places that could be a good fit for logging

Thanks for any help

Larsi


Solution

  • IdentityServer supports both developer logging and production events. You can turn on event on the IdentityServerOptions - by default the default logging sink is used to output the events.

    On github people created an ElasticSearch sink or you can create your own by implementing IEventService