by Overwolf
  • Nitro
  • Publishers
    PUBLISHERS
    How it Works Documentation Newsletter
  • Advertisers
    ADVERTISERS
    Advertisers Offering Top Sites
  • Resources
    RESOURCES
    Ad Unit Demos Blog & News Press Releases FAQ Case Studies
  • NitroDex
Log in

Ad Publishers

  • Special Ad Formats
  • Installing the ad script on your page
  • Creating an ad placement
  • Setting up your ads.txt file
  • Creating a Playlist and Adding Content
  • US Privacy law compliance steps
  • Creating a Video Placement
  • Ad script lifecycle events
  • Detecting ad-blocking users
  • Placement Configuration API

Data and Privacy

  • Passing Hashed Emails
  • Support for Google Analytics and Consent Mode
  • Adding custom consents or disclosures
  • Creating a link for the user to manage their consents

FAQs and Demos

  • FAQ
  • Ad Layout Best Practices
  • Nitro Glossary
  • Electron Apps and NitroPay
  • NitroPay
  • Docs
  • Initializing the Users SDK

Initializing the Users SDK

An Auth instance is first required in order to create the UserClient needed to interact with the SDK.

Websites that are loading the CDN copy of Users can implement a very basic vanilla JavaScript connection with the following code snippet.

<script type="text/javascript">
var auth = null;
var users = null;

window['nitroAuth'].init({
  clientId: 'YourClientId',
  scope: 'openid offline',
}, window.localStorage, function(a) {
  auth = a;

  window['nitroUsers'].init(auth, function(u) {
    users = u;

    // UserClient and Auth are now available!
  });
});
</script>

A JavaScript module application could accomplish the same thing like this.

import { Auth } from '@nitropay/sdk/src/auth';
import { UsersClient } from '@nitropay/sdk/src/users';

const auth = new Auth({
  clientId: 'YourClientID', 
  scope: 'openid offline' 
});
const users = new UsersClient(auth);
What are your Feelings
Share This Article :
  • Facebook
  • Twitter
  • LinkedIn
  • Pinterest
Updated on January 25, 2023
We use cookies to improve your experience and increase the relevancy of content when using Nitro. Our cookies are used for analytics, optimization, and advertising operations. Learn more.Got it
  • Publishers

    • How it works
    • Documentation
    • Newsletter
  • Advertisers

    • Advertisers Offering
    • Top Sites
  • Resources

    • Ad Unit Demos
    • Blog & News
    • Press Releases
    • FAQ
    • Case Studies
  • Companions

    • Overwolf
    • CurseForge
    • Tebex
  • Nitrodex

© Overwolf. All rights reserved.
  • Terms of Service
  • Privacy Policy