UNPKG

react-native-auth2.0-twitch

Version:

A lightweight React Native library for integrating Twitch OAuth 2.0 authentication using Android Custom Tabs. It allows you to securely authenticate users with Twitch by launching an external browser window (Custom Tabs) and handling the OAuth flow withou

13 lines (10 loc) 436 B
import type { TurboModule } from 'react-native'; import { TurboModuleRegistry } from 'react-native'; export interface Spec extends TurboModule { /** * Opens the given URL in the internal browser (Custom Tabs / SFSafariViewController) * Returns a Promise<boolean> with true if the URL was opened successfully */ open(url: string): Promise<boolean>; } export default TurboModuleRegistry.getEnforcing<Spec>('Auth20Twitch');