npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@applaudiq/embed-capacitor

v1.3.0

Published

Capacitor SDK to embed the Applaud IQ recognition portal (auto + manual login, native SSO). Works with plain Capacitor and Ionic React/Angular/Vue.

Readme

@applaudiq/embed-capacitor

npm

Embed the full Applaud IQ recognition portal inside a Capacitor app — plain Capacitor or Ionic React / Angular / Vue — with auto-login (a one-time token minted by your server) or manual login (the portal's own email / SSO). The portal renders in an <iframe>; SSO and the Android Back button go through Capacitor's native plugins.

  • Works with plain Capacitor and Ionic (React / Angular / Vue) — the API is framework-agnostic.
  • Auto + manual login, the HR-approval gate, and native SSO (Google / Microsoft).
  • Peer deps: @capacitor/core, @capacitor/app, @capacitor/browser.

1. Install

npm install @applaudiq/embed-capacitor@^1.3.0 @capacitor/app @capacitor/browser
npx cap sync

2. Register your SSO callback scheme

SSO opens in the system browser and the backend hands the one-time code back to your app's deep link. Pick a scheme unique to your app (not the brand-wide applaudiq://) and register it natively:

<!-- iOS: ios/App/App/Info.plist -->
<key>CFBundleURLTypes</key>
<array><dict>
  <key>CFBundleURLSchemes</key><array><string>myapp</string></array>
</dict></array>
<!-- Android: android/app/src/main/AndroidManifest.xml — inside <activity android:name=".MainActivity"> -->
<intent-filter>
  <action android:name="android.intent.action.VIEW" />
  <category android:name="android.intent.category.DEFAULT" />
  <category android:name="android.intent.category.BROWSABLE" />
  <data android:scheme="myapp" android:host="sso-callback" />
</intent-filter>

Pass it as ssoCallback (the SDK sends it to the backend as native_redirect). Default applaudiq://sso-callback.

3. Render the embed

Manual login — just the publishable key:

import { ApplaudIQ } from '@applaudiq/embed-capacitor';

ApplaudIQ.init({ key: 'pk_live_…', ssoCallback: 'myapp://sso-callback' })
  .open({ mode: 'manual', render: 'fullscreen' });

Auto-login — a one-time token your backend minted (POST /api/v1/embed/sessions):

const embed = ApplaudIQ.init({ key: 'pk_live_…', ssoCallback: 'myapp://sso-callback' }).open({
  mode: 'auto',
  token: embedToken,
  render: 'fullscreen',
  onReady: () => {},        // signed in
  onAuthPending: () => {},  // awaiting HR approval
  onError: (m) => {},       // failed (incl. SSO ?error=)
  onClose: () => {},        // dismissed
});
// later: embed.close();

4. Options

| Option | | |---|---| | config.key | Publishable key (pk_live_…). Required, both modes. | | config.baseUrl | Portal origin. Defaults to the production portal. HTTPS in production. | | config.ssoCallback | Your app's scheme://host deep link (default applaudiq://sso-callback); sent as native_redirect. | | config.backNavigation | true (default): Android hardware Back + iOS left-edge swipe step back inside the embed (onClose at the root). false: platform default, no iOS swipe. See Back navigation. | | mode | 'auto' (needs token) or 'manual' (portal login). | | render | 'fullscreen' (default) · 'modal' · 'inline' (needs container). | | callbacks | onReady · onAuthPending · onError(message) · onClose · onSignOut. |

Back navigation

The portal renders in a cross-origin iframe, so the SDK can't read its history directly. With backNavigation on (the default), it relays a back request to the portal, which steps back through its own screens and replies only when it's already at the embed root — then the SDK tears the embed down and fires onClose. Route home in onClose (the Angular example navigates back to its Home page there):

  • Android — the hardware Back button.
  • iOS — a left-edge swipe (iOS has no hardware Back, and WKWebView's own swipe-back can't traverse the iframe). The gesture lives in the leftmost ~20px of the embed.
.open({
  mode: 'manual',
  onClose: () => router.navigate(['/']),   // dismissed at the embed root → go Home
});

How SSO works

mode: 'manual' shows the portal's email / SSO login inside the embed. SSO can't run in a WebView, so the SDK opens the IdP in the system browser (@capacitor/browser) at …/auth/sso/{provider}/employee/authorize?native=1&native_redirect=<ssoCallback>. The backend redirects the one-time code to <ssoCallback>?code= (or ?error=), @capacitor/app's appUrlOpen catches it, and the SDK relays it into the embed, which redeems it and reloads — signed in.

Downloads & external links

When the portal (or the reward store nested inside it) needs to open a URL outside the WebView — a file download, a payment page, or an OAuth handoff — it sends the applaudiq:open-external bridge message with payload { url }. The SDK opens http(s) URLs in the system browser (@capacitor/browser). No app code is required; it works out of the box.

The reward store's gift-card voucher download additionally sends applaudiq:save-file with payload { base64, filename, mime } — the file bytes, since a blob download can't reach disk in a WebView. To enable it, install the two optional plugins in your app:

npm install @capacitor/filesystem @capacitor/share
npx cap sync

The SDK then writes the file to the app cache and opens the OS share sheet ("Save to Files" / share targets). If the plugins aren't installed, voucher downloads are a silent no-op — nothing else is affected.

Test integration

A runnable example ships for each framework in applaudiq-sdk-example under native-integration/capacitor/ (vanilla · react · angular · vue · ionic-react · ionic-angular · ionic-vue).

Latest: v1.3.0 (LTS). See CHANGELOG.md. MIT licensed.