0

I have a custom IdentityProvidersProcessor for federated user authentication for a front-end user facing site. I would like to also Identify the user as a Contact when they log in. When is the best time / place to Identify the Contact? I tried it in the SecurityTokenValidated notification but the Tracker is not available at this point in the middleware.

4
  • If performance is not a big concern , you could try initlialize tracker on successfull auth
    – Abhay Dhar
    Commented Aug 31, 2020 at 13:24
  • I tried, it didn't work Commented Aug 31, 2020 at 22:54
  • Were there any exceptions raised ? The tracker can get initialized from anywhere , not sure if its throwing an exception which is not logged. maybe try debugging the starttracker() to see if its not throwing an exception ?
    – Abhay Dhar
    Commented Sep 1, 2020 at 11:01
  • No exceptions, just Tracker.Current is still null. I think it makes sense that there would not be the tracker and session available at that point. Commented Sep 1, 2020 at 23:40

1 Answer 1

1

The method I went with in the end is to have a httpRequestProcessed pipeline processor that does the following

  • Check if the tracker contact is not null and the context user is authenticated
  • Check a custom session variable is set of whether this pipeline has run
  • Identify the contact and then set the custom session variable is set of whether this pipeline has run

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.