Uploaded image for project: 'RH-SSO'
  1. RH-SSO
  2. RHSSO-2447

Correction to Javascript example

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Done
    • Icon: Major Major
    • None
    • None
    • Documentation
    • None
    • False
    • Hide

      None

      Show
      None
    • False

      Red Hat developer Stacey Mosier reports that the Javascript example in the RH SSO Securing Apps guide is not printing errors. 

      https://access.redhat.com/documentation/en-us/red_hat_single_sign-on/7.6/html/securing_applications_and_services_guide/oidc#javascript_adapter

      She suggests it can  be updated to use console.error instead of alert, and print the errors:

      keycloak.init(options)
        .then(function(authenticated)

      {     console.log('rh_keycloak:' + (authenticated ? 'authenticated' : 'not authenticated'));   }

      ).catch((error) => {
          for (const property in error) {
          console.error(`${property}: ${error[property]}`);
        }
      });

       

              amunro@redhat.com Andrew Munro
              amunro@redhat.com Andrew Munro
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: