Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

idx.error.user.not.assigned.to.app property cannot be overriden #2690

Closed
margish opened this issue Aug 9, 2022 · 8 comments · May be fixed by #3181
Closed

idx.error.user.not.assigned.to.app property cannot be overriden #2690

margish opened this issue Aug 9, 2022 · 8 comments · May be fixed by #3181
Labels

Comments

@margish
Copy link

margish commented Aug 9, 2022

Describe the bug

We are trying to replace the default value for "idx.error.user.not.assigned.to.app" with a custom error instead of the default "User is not assigned to the client application." All other properties replacement are working fine inside the i18n.en{} block except for this one.

What is expected to happen?

Based on the documents, I should be able to see the replacement test in error field.

What is the actual behavior?

The default error text shows up.

Reproduction Steps

add I18n.en{} configs and add "idx.error.user.not.assigned.to.app" key with custom error text value.
When your application has the error "User is not assigned to the client application.", the original error text shows up instead of customized error text.

SDK Versions

okta/okta-auth-js: 6.5.1
okta/okta-react: 6.4.3
okta/okta-signin-widget: 6.3.2

Execution Environment

Google Chrome 104.0.5112.79, MacOS 12.5
Firefox 103.0.2, MacOS 12.5

Additional Information?

No response

@margish margish added the bug label Aug 9, 2022
@bernica
Copy link

bernica commented Nov 3, 2022

Were you able to work around it? I'm trying to translate without success.

@margish
Copy link
Author

margish commented Nov 4, 2022

No, we are still having this issue.
Here are the steps to reproduce:

  1. Setup a user in okta and remove their assignment from application.
  2. Login using the user credentials to confirm you see the error message "User is not assigned to the client application."
  3. In the web app, set the property for i18n.en.idx.error.user.not.assigned.to.app to "My custom error message"
    i18n: { en: { 'idx.error.user.not.assigned.to.app': 'My custom error message' } }
  4. Repeat step 2. We are still seeing the message "User is not assigned to the client application." instead of the expected message "My custom error message"

@denysoblohin-okta
Copy link
Contributor

Thanks for submitting this issue.
I debugged current response for this error and noticed the key name is idx.error.code.user_not_assigned.
Please try it instead

@margish
Copy link
Author

margish commented Mar 24, 2023

I gave it a try and idx.error.code.user_not_assigned doesn't work as well. Here is an interesting observation: the default values for idx.error.code.user_not_assigned is You are not allowed to access this app. To request access, contact an admin. and the default value for idx.error.user.not.assigned.to.app is User is not assigned to this application. in https://github.com/okta/okta-signin-widget/blob/master/packages/%40okta/i18n/src/properties/login.properties

However, the error message that we are seeing and trying to override is User is not assigned to the client application. which is different than both the custom label defaults.
Also I noticed a unit test in https://github.com/okta/okta-signin-widget/blob/master/test/e2e/features/oidc.feature line 10 has the same message that we are seeing.

@denysoblohin-okta
Copy link
Contributor

It means you are using classic engine. Error access_denied is not localisable for classic engine.
Internal ref: OKTA-595567

@margish
Copy link
Author

margish commented Mar 30, 2023

Got it. Thank you.

@margish margish closed this as completed Mar 30, 2023
@denysoblohin-okta
Copy link
Contributor

@margish
Can you upgrade to OIE engine?
Or do you have a requirement to have localized access_denied error in classic engine so we can fix it?

@margish
Copy link
Author

margish commented Mar 30, 2023

We are planning on upgrading to OIE.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants