okta / okta-signin-widget

HTML/CSS/JS widget that provides out-of-the-box authentication UX for your organization's apps
Other
373 stars 320 forks source link

Return Okta user ID and other user attributes in `postSubmit` registration hook #3673

Open joshuacollins-deloitte opened 1 month ago

joshuacollins-deloitte commented 1 month ago

Describe the feature request

Currently, when a user account is created using self-service registration, there seems to be no way to gain information about the created Okta account from the frontend for analytics purposes.

The Okta SDK receives the ID of the newly created user in the API response from the /idp/idx/enroll/new call - it would be helpful if the widget made this information available in hooks.

Snippet of /new response:

{
<snip>
"user": {
        "type": "object",
        "value": {
            "id": "00ugquwxxjnxSPgM5697",
            "identifier": "user@email.com",
            "profile": {
                "firstName": "abc",
                "lastName": "123",
                "timeZone": "America/Los_Angeles",
                "locale": "en_US",
                "email": "u***r@email.com"
            }
        }
    },
</snip>
}

New or Affected Resource(s)

postSubmit registration hook

Provide a documentation link

https://github.com/okta/okta-signin-widget?tab=readme-ov-file#registration

Additional Information?

No response

denysoblohin-okta commented 1 month ago

Thanks for your feature request. Sounds reasonable. Internal ref: OKTA-749134