Developer forum

Forum » Dynamicweb 9.0 Upgrade issues » Okta.LoginProvider NullRefereneException

Okta.LoginProvider NullRefereneException

Unnsteinn Garðarsson
Unnsteinn Garðarsson
Reply

Hello, I recently upgraded a project from 9.8.10 to 9.9.8 and along the upgrade I got some new DW features like Okta. I have however not selected Okta as an external authentication option but I am getting this error very often.

Origin: LogEventBeforeSave - Action: ExternalAuthentication - Category: Health - ExceptionType: NullReferenceException - Description: Error registering provider Dynamicweb.Content.Social.Adapters.ExternalAuthentication.Okta.LoginProvider - StackTrace: 2021-03-26 06:00:11.893: Error registering provider Dynamicweb.Content.Social.Adapters.ExternalAuthentication.Okta.LoginProvider. System.NullReferenceException: Object reference not set to an instance of an object.   
   at Dynamicweb.Content.Social.Adapters.ExternalAuthentication.Okta.LoginProvider.SetMetadataAddress(OpenIdConnectAuthenticationOptions options)   
   at Dynamicweb.Content.Social.Adapters.ExternalAuthentication.Okta.LoginProvider.CreateOptions(String optionsName)   
   at Dynamicweb.Content.Social.Adapters.ExternalAuthentication.Okta.LoginProvider.RegisterProvider(IAppBuilder app)   
   at Dynamicweb.Content.Social.Adapters.ExternalAuthentication.OwinStartup.Configuration(IAppBuilder app)

Any ideas?

 

Regards.

Unnsteinn


Replies

 
Nicolai Pedersen
Reply

What do you have in your "ExternalLoginProvider" table?

 
Unnsteinn Garðarsson
Unnsteinn Garðarsson
Reply

It is empty. We are just using the Extranet for authentication, no external authentication is enabled.

 
Nicolai Pedersen
Reply

I think that this and the other exception you have is quite weird.

This call stack should not be possible if you have no records in that table... Are you sure your are looking into the right database?

 
Unnsteinn Garðarsson
Unnsteinn Garðarsson
Reply

Yes I am positive that I am talking to the right database. These Okta errors did not show up until the upgrade I did yesterday.

 
Alexey Tanchenko Dynamicweb Employee
Alexey Tanchenko
Reply

Hello!

This bug was already fixed.
Update the Dynamicweb.Content.Social.Adapters.ExternalAuthentication.Okta package to version 5.0.2 and the exception should gone.

Workaround.
If you cannot update it for some reason, you can try to create an external authentication provider of type Okta, deactivate it and set some non-empty value for "Authorization server URL" field.

 

You must be logged in to post in the forum