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

Why digitrust callback triggered twice ? #4728

Closed
ckybonist opened this issue Jan 14, 2020 · 3 comments
Closed

Why digitrust callback triggered twice ? #4728

ckybonist opened this issue Jan 14, 2020 · 3 comments

Comments

@ckybonist
Copy link

Type of issue

bug and or question

Description

The callback was triggered twice by userId module.

pbjs.setConfig({
  userSync: {
    userIds: [{
      name: "pubCommonId",
      storage: {
        type: "cookie",
        name: "_pubcid",       // create a cookie with this name
        expires: 365           // expires in 1 years
      }
    }, {
      name: "digitrust",
      params: {
        init: {
          member: 'example_member_id',
          site: 'example_site_id'
        },
        callback: function (digiTrustResult) {
          if (digiTrustResult.success) {
            console.log('Success in Digitrust init', digiTrustResult.identity.id);
          } else {
            console.error('Digitrust init failed');
          }
        }
      },
      storage: {
        type: "html5",
        name: "pbjsdigitrust",
        expires: 60
      }
    }]
  }});

Steps to reproduce

Just use the example on userId document

Test page

Success in Digitrust init
xxxxxxxxx

NOTE: xxxxxx means the id value

Expected results

Only executed / triggered the callback once.

Actual results

Callback has been executed twice.

Platform details

Other information

@bretg
Copy link
Collaborator

bretg commented Jan 14, 2020

@goosemanjack - can you take a look?

@goosemanjack
Copy link
Contributor

goosemanjack commented Jan 14, 2020 via email

goosemanjack added a commit to InteractiveAdvertisingBureau/Prebid.js that referenced this issue Jan 16, 2020
…r site callback twice after ID is obtained.
@goosemanjack
Copy link
Contributor

PR #4745
Thank you for reporting this. This PR fixes the issue.

@bretg bretg closed this as completed Jan 17, 2020
idettman pushed a commit that referenced this issue Jan 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants