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 🙏

© 2025 – Pkg Stats / Ryan Hefner

simplici-auth-angular-ionic

v0.5.6

Published

SimpliciAuthAngularIonic is a powerful Angular library designed to seamlessly integrate social authentication into your Ionic/Angular applications. It supports a wide range of providers including Google, Microsoft, Facebook, and Apple, with optimized comp

Downloads

240

Readme

SimpliciAuthAngularIonic

SimpliciAuthAngularIonic is a powerful Angular library designed to seamlessly integrate social authentication into your Ionic/Angular applications. It supports a wide range of providers including Google, Microsoft, Facebook, and Apple, with optimized compatibility for both web and native mobile platforms (iOS/Android) using Capacitor or Cordova.

🔐 Key Features:

  • Social Login Support: Easily integrate SSO with Google, Microsoft, Facebook, Apple, and more.
  • Mobile + Web Ready: Works out of the box for browser-based apps and native mobile builds.
  • Email/Mobile Authentication: Supports user sign-in and sign-up using mobile number or email, in addition to SSO.
  • Customizable UI: Easily style or replace default components for a tailored authentication experience.
  • Token Management: Secure token handling with built-in support for access and refresh tokens.
  • Lightweight

Installation

Install the package in your Angular/Ionic project:

npm install simplici-auth-angular-ionic

Usage

Import the module and use the component in your app:

// app.module.ts
import { SimpliciAuthAngularIonicModule } from 'simplici-auth-angular-ionic';

@NgModule({
  imports: [
    // ... other imports
    SimpliciAuthAngularIonicModule,
  ],
})
export class AppModule {}

Add the component to your template:

<!-- app.component.html -->
<simplici-auth-angular-ionic
  [googleRedirectUrl]="'com.googleusercontent.apps.YOUR_CLIENT_ID'"
  [microsoftRedirectUrl]="'msauth.YOUR_MICROSOFT_CLIENT_ID://auth/callback'"
  [appleRedirectUrl]="'com.satschel.auth://apple/callback'"
  (onStepChange)="onStepChange($event)"
  (onComplete)="onComplete($event)"
  (onError)="onError($event)"
></simplici-auth-angular-ionic>

iOS Setup

  1. Register your custom URL scheme:
    • Open ios/App/App/Info.plist and add your URL schemes under CFBundleURLTypes:
<key>CFBundleURLTypes</key>
<array>
  <dict>
    <key>CFBundleTypeRole</key>
    <string>Editor</string>
    <key>CFBundleURLName</key>
    <string>com.satschel.auth</string>
    <key>CFBundleURLSchemes</key>
    <array>
      <string>com.googleusercontent.apps.YOUR_CLIENT_ID</string>
      <string>msauth.YOUR_MICROSOFT_CLIENT_ID</string>
      <string>fbYOUR_FACEBOOK_ID</string>
      <string>com.satschel.auth</string>
    </array>
  </dict>
</array>
  1. Update capacitor.config.ts:
    • Set your custom scheme for iOS:
// capacitor.config.ts
const config = {
  ios: {
    scheme: 'com.googleusercontent.apps.YOUR_CLIENT_ID',
  },
  // ... other config
};
export default config;
  1. Sync and rebuild your app:
npx cap sync ios
npx cap open ios

Android Setup

  1. Register your custom scheme in AndroidManifest.xml:
    • Open android/app/src/main/AndroidManifest.xml and add an intent filter inside the <activity> tag for your main activity:
<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="com.googleusercontent.apps.YOUR_CLIENT_ID" android:host="auth" android:path="/callback" />
</intent-filter>
  1. Update capacitor.config.ts:
    • Set your custom scheme for Android:
// capacitor.config.ts
const config = {
  android: {
    scheme: 'com.googleusercontent.apps.YOUR_CLIENT_ID',
  },
  // ... other config
};
export default config;
  1. Sync and rebuild your app:
npx cap sync android
npx cap open android
  1. Google OAuth Setup for Android:
    • In the Google Cloud Console, create an OAuth client for Android.
    • Add the redirect URI: com.googleusercontent.apps.YOUR_CLIENT_ID:/auth/callback
    • Download the google-services.json and place it in android/app/.

Google OAuth Setup

  1. Create an OAuth Client in Google Cloud Console:

    • Type: iOS and/or Android
    • Bundle ID (iOS): io.ionic.starter (or your app's bundle ID)
    • Package Name (Android): your.package.name
    • Add the redirect URI: com.googleusercontent.apps.YOUR_CLIENT_ID:/auth/callback
  2. Update your GoogleService-Info.plist (iOS) or google-services.json (Android):

    • Download from Google Cloud Console and place in the appropriate directory.
  3. Set the Google redirect URL in your component:

<simplici-auth-angular-ionic
  [googleRedirectUrl]="'com.googleusercontent.apps.YOUR_CLIENT_ID'"
  ...
></simplici-auth-angular-ionic>
  1. Handle the OAuth callback in your app:
    • The library will automatically handle the callback and emit events for success, error, and step changes.

Example: Handling Events

onStepChange(event: any) {
  console.log('Step changed:', event);
}
onComplete(event: any) {
  console.log('Auth complete:', event);
}
onError(error: any) {
  console.error('Auth error:', error);
}

Additional Resources