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

@d11/dream-auth-login-provider

v0.2.4

Published

Provides authentication utilities for integrating user login through the Dream11 SDK.

Readme

DreamAuth Login Provider

A React Native library that provides seamless authentication login functionality for Dream11 applications. This library handles OAuth flows, session management, and deep linking for secure user authentication.

Features

  • OAuth Authentication Flow - Complete OAuth 2.0 implementation for Dream11 authentication
  • WebView Integration - Secure web-based login flow with custom WebView implementation
  • Deep Link Handling - Automatic deep link processing for authentication callbacks
  • Cross-Platform - Full support for both iOS and Android platforms
  • Session Management - Robust session handling with refresh token support
  • Security - Secure token storage and transmission
  • Turbo Module - Built with React Native's new architecture for optimal performance

Installation

npm install @d11/dream-auth-login-provider
yarn add @d11/dream-auth-login-provider

iOS Setup

  1. Install pods:
cd ios && pod install
  1. Add URL scheme to your Info.plist:
	<key>CFBundleURLTypes</key>
	<array>
		<dict>
			<key>CFBundleTypeRole</key>
			<string>Editor</string>
			<key>CFBundleURLName</key>
			<string>com.dream11.app</string>
			<key>CFBundleURLSchemes</key>
			<array>
				<string>dream11</string>
			</array>
		</dict>
	</array>
  1. Handle deep links in your AppDelegate.swift:
import DreamAuthLoginProvider 

  func application(_ application: UIApplication, handleOpen url: URL) -> Bool { 
    if url.scheme == "dream11" {
      DreamAuthLoginProviderInitializer.handleRedirect(
        uri: url.absoluteString, refreshToken: nil,
        baseUrl: "https://auth.dream11.com", providerApp: "dream11")
      return true
    }

    return RCTLinkingManager.application(application, open: url, options: [:])
  }

Android Setup

  1. Add deep link handling to your AndroidManifest.xml:
<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="dream11" />
  </intent-filter>
</activity>
  1. Handle deep links in your MainActivity.kt:

import com.dreamauthloginprovider.DreamAuthLoginProviderInitializer

override fun onNewIntent(intent: Intent?) {
  super.onNewIntent(intent)
  intent?.data?.let { uri ->
    if (uri.scheme == "dream11") {
       DreamAuthLoginProviderInitializer.handleRedirect(
        context = this,
        uri = uri.toString(),
        refreshToken = "",
        baseUrl = ""

      )
    }
  }
}

Authentication Flow Overview

  1. Deep Link Reception: The library intercepts deep links with the dream11 scheme
  2. Session Initialization: Parses authentication parameters and initializes session
  3. WebView Launch: Opens a secure WebView for user authentication
  4. Session Verification: Verifies the authentication session with the server
  5. Consent Handling: Manages user consent for data sharing
  6. Redirect Completion: Redirects back to the host application with authentication results

Authentication States

The library handles various authentication states:

  • LOGGED_IN - User successfully authenticated
  • CONSENT_NOT_PROVIDED - User denied consent
  • LOGIN_DISMISSED - User cancelled the login flow
  • SOMETHING_WENT_WRONG - An error occurred during authentication

Architecture

The library is built with a modular architecture supports both React Native architecture:

Core Components

  • Configuration: Session management and initialization
  • WebView Flow: Secure web-based authentication
  • Deep Link Handling: URL scheme processing and routing
  • Verification Flow: Session verification and consent handling
  • HTTP Client: Network communication with authentication servers
  • Client Details: Client application configuration management

Platform-Specific Implementation

  • iOS: Swift-based implementation with UIKit integration
  • Android: Kotlin-based implementation with Android Activities
  • React Native: TypeScript bridge for cross-platform functionality

Development

Setup

  1. Clone the repository:
git clone https://github.com/dream11/dream-auth-login-provider.git
cd dream-auth-login-provider
  1. Install dependencies:
yarn
  1. Run the example app:
# Start Metro bundler
yarn example start

# Run on iOS
yarn example ios

# Run on Android
yarn example android

Available Scripts

  • yarn typecheck - TypeScript type checking
  • yarn lint - ESLint linting
  • yarn test - Run unit tests
  • yarn clean - Clean build artifacts
  • yarn prepare - Build the library
  • yarn release - Release new version

Security

  • All network communications use HTTPS
  • Tokens are securely stored and transmitted
  • WebView implementation prevents unauthorized access
  • Session validation ensures authentication integrity

Contributing

We welcome contributions! Please see our Contributing Guide for details on:

  • Development workflow
  • Code style and linting
  • Testing requirements
  • Pull request process
  • Commit message conventions

License

MIT License - see LICENSE file for details.

Support

For support and questions:

  • Create an issue on GitHub
  • Contact the development team
  • Check the example app for usage patterns

Made with ❤️ by the Dream11 team