okta / okta-auth-js

The official js wrapper around Okta's auth API
Other
453 stars 265 forks source link

idx.register function with activationToken returns Bad Request error ("access_denied" and "The requested feature is not enabled in this environment." error.). #1297

Open sb-developers opened 2 years ago

sb-developers commented 2 years ago

Describe the bug?

When we call to idx.register({activationToken: this.token, authenticator: 'okta_password', password: this.newPasswordForm.value.password}) function returns "Bad Request". Concretically, returns "access_denied" and "The requested feature is not enabled in this environment." error.

What is expected to happen?

We expect to register user with his new Password and activate user.

What is the actual behavior?

Register user with his new Password and activate user.

Reproduction Steps?

In this moment we don't have access online: 1) We create register page only getting email. When submit register, we call to Okta’s "users" (POST) API. 2) This first step returns User Activation email where we’ve got a button to redirect a new page to confirm email and add his password. This URL contains activation_token to register. 3) When submit password, we call to this function: idx.register({activationToken: this.token, authenticator: ‘okta_password’, password: this.newPasswordForm.value.password}). 4) Returns error

SDK Versions

@okta/okta-angular: ^5.1.1 @okta/okta-auth-js: ^6.1.0 @okta/okta-signin-widget: ^6.0.1

Execution Environment

Browser

Additional Information?

Angular application

oleksandrpravosudko-okta commented 2 years ago

Thanks for report @sb-developers. Can you please confirm your org's profile enrollment policy is configured to allow sign up?

sb-developers commented 2 years ago

Hi Oleksandr, Thanks for your response. I'm trying to search this page into our Okta Admin menu, but we don't find nothing like this. Where will be appear this page? If we didn0't found it, What could we do? Thanks,

denysoblohin-okta commented 2 years ago

"Security -> Profile Enrollment" - list of Profile Enrollment policies including "Default Policy". Click on Edit icon to open edit page. Under "Enrollment settings" select "Actions -> Edit". In "Edit rule" pop-up find "For new users: Sign-up - Allowed / Denied"

Also you can reach out to support@okta.com

Screenshot 2022-09-12 at 11 56 35
sb-developers commented 2 years ago

Hi Oleksandr, Thanks for your response. No... If you can see in the image, we don't have this section in our Okta Admin menu. What can we do?

image

denysoblohin-okta commented 2 years ago

Please reach out to support@okta.com . Self-Service Registration feature should be enabled for your account

sb-developers commented 2 years ago

Ok, we will talk with Okta support. Thanks!

denysoblohin-okta commented 1 year ago

@sb-developers Have you found a solution? If yes, can we close this issue?

ikermonk commented 1 year ago

No, we didn't. Okta support didn't answer us.... But you can close this issue.