Developer forum

Forum » Development » How to detect if Logged in user is using External Authentication

How to detect if Logged in user is using External Authentication

Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi,

 

I need to validate if the logged in user has logged in using external authentication (i.e. OKTA) so that we can remove some features (i.e. Change password link).

 

What is the best way to check for that?

  • Would Context.Current.Session["DW_extranet_ExternalLoginProviderID"] be the right one?
  • Is there a user method I could be using?
  • Should I be checking the existance of a cookie?

 

I am trying to make this generic for any External Authentication provider, so a solution tied to a single Provider is less appreciated.

 

Best Regards,

Nuno Aguiar


Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply
This post has been marked as an answer

The user has a ExternalLogOnProviderID property. I have no better options.

Votes for this answer: 1
 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Perfect Nicolai, thank you for confirming

 

You must be logged in to post in the forum