Skip to content

OIDCApplicationBuilder SignOnMode throwing an error #1619

@aronAtWex

Description

@aronAtWex

Describe the bug?

I posted the issuer here.
https://devforum.okta.com/t/the-settings-signon-object-doesnt-match-the-type-indicated-by-signonmode-value-or-is-ill-defined/32805

Quickly
Our company has code to create an Application used the SDK. Have just upgraded to 21.
Using the existing code on the new SDK is throwing an error.

{“errorCode”:“E0000001”,“errorSummary”:“Api validation failed: mediated”,“errorLink”:“E0000001”,“errorId”:“oae7-tAznSQR4u9e85T8TV4bw”,“errorCauses”:[{“errorSummary”:“Invalid signOnMode”},{“errorSummary”:“The settings.signOn object doesn’t match the type indicated by signOnMode value or is ill defined”}]}

Looks like the Application class has a set SignOn Mode. Which is what I have tried.

https://okta.github.io/okta-sdk-java/20.0.0/apidocs/com/okta/sdk/resource/application/ApplicationBuilder.html#setSignOnMode(com.okta.sdk.resource.model.ApplicationSignOnMode)

But it looks like there is a setting Sign On mode.
OpenIdConnectApplicationSettings

https://okta.github.io/okta-sdk-java/20.0.0/apidocs/com/okta/sdk/resource/model/OpenIdConnectApplicationSettings.html#setSignOn(com.okta.sdk.resource.model.AutoLoginApplicationSettingsSignOn)

I don't see a way to set this value.
I'm not sure if I'm using an old class, and there could be a new way to create OIDC Applications.

Any idea?

What is expected to happen?

I'm expecting old code to create the application.
Also expecting if I do pass down.

setSignOnMode(ApplicationSignOnMode.OPENID_CONNECT)

That both the Application Sign On Mode and the Setting.signOnMode would be set. It is a required field.

What is the actual behavior?

It gives an error.

{“errorCode”:“E0000001”,“errorSummary”:“Api validation failed: mediated”,“errorLink”:“E0000001”,“errorId”:“oae7-tAznSQR4u9e85T8TV4bw”,“errorCauses”:[{“errorSummary”:“Invalid signOnMode”},{“errorSummary”:“The settings.signOn object doesn’t match the type indicated by signOnMode value or is ill defined”}]}

Reproduction Steps?

Try to create an Application with these values.

theApp = OIDCApplicationBuilder.instance() .addGrantTypes(OAuthGrantType.AUTHORIZATION_CODE) .setSignOnMode(ApplicationSignOnMode.OPENID_CONNECT) .setLabel(appName) .addResponseTypes(OAuthResponseType.CODE) // Have to have code, maybe Token Id? .setApplicationType(applicationType) .setTokenEndpointAuthMethod( (applicationType.equals(OpenIdConnectApplicationType.WEB)) ? OAuthEndpointAuthenticationMethod.CLIENT_SECRET_BASIC : OAuthEndpointAuthenticationMethod.NONE) .setRedirectUris(signInRedirectUri) .setPostLogoutRedirectUris(signOutRedirectUri) .setIOS(true) .setWeb(true) .buildAndCreate(oktaApplicationApi);
Throws an error because the setting.SignOn is not set.

Additional Information?

No response

Java Version

Java 17

SDK Version

SDK 21

OS version

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions