{"_id":"@bisham/oauth","_rev":"2-b0011313656b73ddc15ceb4f3ecd0a0c","name":"@bisham/oauth","dist-tags":{"latest":"0.0.2"},"versions":{"0.0.1":{"name":"@bisham/oauth","version":"0.0.1","keywords":["oauth","oauth2","oauth-2.0","social-login","social-auth","social-authentication","authentication","authorization","sso","single-sign-on","identity-provider","idp","third-party-auth","typescript","framework-agnostic","react","vue","svelte","vanilla-js","sdk","popup-window","authorization-code","pkce","code-flow","implicit-flow","provider","apple","google","google-auth","google-oauth","googleAuthCode","googleAuthToken","googleOneTap","google-one-tap","atlassian","discord","dropbox","facebook","figma","github","gitlab","instagram","linkedin","notion","slack","tiktok","twitch","twitter","zoom"],"author":{"url":"https://bishamkunwor.com.np","name":"Bisham Kunwor","email":"novelian.nova@gmail.com"},"license":"MIT","_id":"@bisham/oauth@0.0.1","maintainers":[{"name":"bishamkunwor","email":"novelian.nova@gmail.com"}],"homepage":"https://github.com/BishamKunwor/BishamKunwor#readme","bugs":{"url":"https://github.com/BishamKunwor/BishamKunwor/issues"},"dist":{"shasum":"698bd67e730b1db01e3fa50dabef88334857d272","tarball":"https://registry.npmjs.org/@bisham/oauth/-/oauth-0.0.1.tgz","fileCount":4,"integrity":"sha512-l3xQsGYWuZVJt0vMcSKr9mnemqEPHNgByC39uBch/WogOK/UCrzySdAhOUXANa7/1Gsbn+SaL94SuZtPXn3wdg==","signatures":[{"sig":"MEUCIFfWTKr66RpCR2wFAGr2/pt89u6XIN4CD335/JTYhT3+AiEAni39xJX714lhZozoIq3u+0PoJv6BVVzqc3j4nyJtgrU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":33518},"main":"dist/index.js","_from":"file:bisham-oauth-0.0.1.tgz","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js","dev-source":"./src/index.ts"}},"scripts":{"build":"rollup -c","watch":"rollup -c -w"},"_npmUser":{"name":"bishamkunwor","email":"novelian.nova@gmail.com"},"_resolved":"/private/var/folders/qd/21nj_6hd08l8sd3mg4jc5b080000gn/T/aeb4c7a36b3df86a529fa16c1e901ae2/bisham-oauth-0.0.1.tgz","_integrity":"sha512-l3xQsGYWuZVJt0vMcSKr9mnemqEPHNgByC39uBch/WogOK/UCrzySdAhOUXANa7/1Gsbn+SaL94SuZtPXn3wdg==","repository":{"url":"git+https://github.com/BishamKunwor/BishamKunwor.git","type":"git","directory":"packages/social-login"},"_npmVersion":"10.9.4","description":"A lightweight, framework-agnostic TypeScript library for OAuth 2.0 social authentication. Supports 20+ providers (Google, Apple, GitHub, Discord, etc.) with type-safe APIs, popup and redirect flows, PKCE support, and works with React, Vue, Svelte, or vani","directories":{},"_nodeVersion":"22.21.1","dependencies":{"js-cookie":"^3.0.5"},"_hasShrinkwrap":false,"devDependencies":{"tslib":"^2.8.1","rollup":"^4.44.2","typescript":"^5.8.3","@types/node":"^24.0.10","@types/react":"^19.2.7","@types/js-cookie":"^3.0.6","rollup-plugin-dts":"^6.2.1","@rollup/plugin-terser":"^0.4.4","@rollup/plugin-typescript":"^12.1.4","@rollup/plugin-node-resolve":"^16.0.1"},"peerDependencies":{"@types/google.accounts":"^0.0.18","@types/apple-signin-api":"^1.5.3"},"_npmOperationalInternal":{"tmp":"tmp/oauth_0.0.1_1767243317836_0.19291323858745613","host":"s3://npm-registry-packages-npm-production"}},"0.0.2":{"name":"@bisham/oauth","version":"0.0.2","main":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"dev-source":"./src/index.ts","types":"./dist/index.d.ts","default":"./dist/index.js"}},"author":{"name":"Bisham Kunwor","email":"novelian.nova@gmail.com","url":"https://bishamkunwor.com.np"},"repository":{"type":"git","url":"git+https://github.com/BishamKunwor/BishamKunwor.git","directory":"packages/social-login"},"keywords":["oauth","oauth2","oauth-2.0","social-login","social-auth","social-authentication","authentication","authorization","sso","single-sign-on","identity-provider","idp","third-party-auth","typescript","framework-agnostic","react","vue","svelte","vanilla-js","sdk","popup-window","authorization-code","pkce","code-flow","implicit-flow","provider","apple","google","google-auth","google-oauth","googleAuthCode","googleAuthToken","googleOneTap","google-one-tap","atlassian","discord","dropbox","facebook","figma","github","gitlab","instagram","linkedin","notion","slack","tiktok","twitch","twitter","zoom"],"license":"MIT","description":"A lightweight, framework-agnostic TypeScript library for OAuth 2.0 social authentication. Supports 20+ providers (Google, Apple, GitHub, Discord, etc.) with type-safe APIs, popup and redirect flows, PKCE support, and works with React, Vue, Svelte, or vani","devDependencies":{"@rollup/plugin-node-resolve":"^16.0.1","@rollup/plugin-terser":"^0.4.4","@rollup/plugin-typescript":"^12.1.4","@types/js-cookie":"^3.0.6","@types/node":"^24.0.10","@types/react":"^19.2.7","rollup":"^4.44.2","rollup-plugin-dts":"^6.2.1","tslib":"^2.8.1","typescript":"^5.8.3"},"peerDependencies":{"@types/apple-signin-api":"^1.5.3","@types/google.accounts":"^0.0.18"},"dependencies":{"js-cookie":"^3.0.5"},"scripts":{"build":"rollup -c","watch":"rollup -c -w"},"_id":"@bisham/oauth@0.0.2","bugs":{"url":"https://github.com/BishamKunwor/BishamKunwor/issues"},"homepage":"https://github.com/BishamKunwor/BishamKunwor#readme","_integrity":"sha512-WxJAa5iGdmbLksPOgKh0t0ytWKMXbSxrsj0PLU53gpDiPGyvWKWw9QLv70z+f2VHhV9gCAGSdGHo+Iwv+I8NuQ==","_resolved":"/private/var/folders/qd/21nj_6hd08l8sd3mg4jc5b080000gn/T/ea0dfd7ce1e602fab7d397359c710abb/bisham-oauth-0.0.2.tgz","_from":"file:bisham-oauth-0.0.2.tgz","_nodeVersion":"22.21.1","_npmVersion":"10.9.4","dist":{"integrity":"sha512-WxJAa5iGdmbLksPOgKh0t0ytWKMXbSxrsj0PLU53gpDiPGyvWKWw9QLv70z+f2VHhV9gCAGSdGHo+Iwv+I8NuQ==","shasum":"4c0fb8ad96a78ee839fd3aebd0c13f5e372dbc8d","tarball":"https://registry.npmjs.org/@bisham/oauth/-/oauth-0.0.2.tgz","fileCount":4,"unpackedSize":33505,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDtQq9Vcbj7VlFl4jX7Sp8C3gjNJHjBojUVXI8wqEZPvgIhAI6KfKdIukO1aR4z5t+ZTUFEJ4pf4mGgRr922N/sxE2d"}]},"_npmUser":{"name":"bishamkunwor","email":"novelian.nova@gmail.com"},"directories":{},"maintainers":[{"name":"bishamkunwor","email":"novelian.nova@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/oauth_0.0.2_1767340393046_0.13185408644885976"},"_hasShrinkwrap":false}},"time":{"created":"2026-01-01T04:55:17.762Z","modified":"2026-01-02T07:53:13.428Z","0.0.1":"2026-01-01T04:55:17.995Z","0.0.2":"2026-01-02T07:53:13.180Z"},"bugs":{"url":"https://github.com/BishamKunwor/BishamKunwor/issues"},"author":{"name":"Bisham Kunwor","email":"novelian.nova@gmail.com","url":"https://bishamkunwor.com.np"},"license":"MIT","homepage":"https://github.com/BishamKunwor/BishamKunwor#readme","keywords":["oauth","oauth2","oauth-2.0","social-login","social-auth","social-authentication","authentication","authorization","sso","single-sign-on","identity-provider","idp","third-party-auth","typescript","framework-agnostic","react","vue","svelte","vanilla-js","sdk","popup-window","authorization-code","pkce","code-flow","implicit-flow","provider","apple","google","google-auth","google-oauth","googleAuthCode","googleAuthToken","googleOneTap","google-one-tap","atlassian","discord","dropbox","facebook","figma","github","gitlab","instagram","linkedin","notion","slack","tiktok","twitch","twitter","zoom"],"repository":{"type":"git","url":"git+https://github.com/BishamKunwor/BishamKunwor.git","directory":"packages/social-login"},"description":"A lightweight, framework-agnostic TypeScript library for OAuth 2.0 social authentication. Supports 20+ providers (Google, Apple, GitHub, Discord, etc.) with type-safe APIs, popup and redirect flows, PKCE support, and works with React, Vue, Svelte, or vani","maintainers":[{"name":"bishamkunwor","email":"novelian.nova@gmail.com"}],"readme":"A lightweight, framework-agnostic TypeScript library for implementing OAuth with multiple platforms.\n\n## Features\n\n- 🚀 **Framework Agnostic** - Works with React, Vue, Svelte, or vanilla JavaScript\n- 🔒 **Type-Safe** - Full TypeScript support with platform-specific types\n- 🎯 **Multiple Platforms** - Support for 20+ OAuth providers\n- 🔄 **Flexible Configuration** - Global and platform-specific settings\n- 🛡️ **Error Handling** - Type-safe error handling with platform-specific error types\n- 🪟 **Popup Support** - Automatic popup window management for URL-based flows\n\n## Supported Platforms\n\n- **Apple**\n- **Atlassian**\n- **Discord**\n- **Dropbox**\n- **Facebook**\n- **Figma**\n- **GitHub**\n- **GitLab**\n- **Google (Auth Code, Token, One Tap)**\n- **Instagram**\n- **LinkedIn**\n- **Notion**\n- **Slack**\n- **TikTok**\n- **Twitch**\n- **Twitter**\n- **Zoom**\n\n## Installation\n\n```bash\nnpm install @bisham/oauth\n# or\npnpm add @bisham/oauth\n# or\nyarn add @bisham/oauth\n```\n\n## Quick Start\n\n### 1. Configure OAuth Platforms\n\nFirst, set up your OAuth platform configurations:\n\n```typescript\nimport { configOauthPlatforms } from \"@bisham/oauth\";\n\nconst { connectSocialPlatform } = configOauthPlatforms(\n  {\n    github: {\n      clientId: \"your-github-client-id\",\n      redirectURI: \"http://localhost:3000/auth/callback\",\n      state: \"random-state-string\",\n      scopes: [\"read:user\", \"user:email\"],\n    },\n    googleAuthCode: {\n      client_id: \"your-google-client-id\",\n      redirect_uri: \"http://localhost:3000/auth/callback\",\n      scope: \"email profile\",\n    },\n    discord: {\n      clientId: \"your-discord-client-id\",\n      state: \"random-state-string\",\n      scopes: [\"identify\", \"email\"],\n    },\n  },\n  {\n    defaultRedirectURI: \"http://localhost:3000/auth/callback\", // Used when platform doesn't specify redirectURI. e.g., here discord does not have redirectUrl setup so it uses defaultRedirectURI.\n  }\n);\n```\n\n> **💡 TypeScript IntelliSense Tip:** For better TypeScript IntelliSense and autocomplete, define your configuration inline (as shown above). This allows TypeScript to properly infer the types and provide platform-specific autocomplete suggestions for each platform's configuration options.\n\n### 2. Connect to a Social Platform\n\n```typescript\ntry {\n  const response = await connectSocialPlatform(\"github\");\n  console.log(\"Authorization code:\", response.code);\n  // Use the code to exchange for access token on your backend\n} catch (error) {\n  console.error(\"OAuth error:\", error);\n}\n```\n\n### 3. Handle Redirect Callback (URL-based flows)\n\nFor OAuth flows, you need to handle the redirect callback. Create a callback page that calls `oauthResponseSubscription()`:\n\n**Example:**\n\n```tsx\n// routes/verify-social-link.tsx\nimport { oauthResponseSubscription } from \"@bisham/oauth\";\nimport { useEffect } from \"react\";\n\nexport default function VerifySocialLink() {\n  useEffect(() => {\n    oauthResponseSubscription();\n  }, []);\n\n  return <div>Verifying...</div>;\n}\n```\n\n## How It Works\n\n### URL-Based Flows (Most Platforms)\n\n1. User clicks \"Sign in with [Platform]\"\n2. `connectSocialPlatform()` opens a popup window with the OAuth authorization URL\n3. User authorizes the application\n4. Platform redirects to your `redirectURI` with authorization code/error\n5. `oauthResponseSubscription()` captures the response and stores it in a cookie\n6. Popup closes and the promise resolves/rejects with the response\n7. Your application handles the response (exchange code for token, etc.)\n\n### SDK-Based Flows (Apple, Google)\n\n1. User clicks \"Sign in with [Platform]\"\n2. `connectSocialPlatform()` loads the platform SDK (if not already loaded)\n3. SDK handles the authentication flow\n4. Promise resolves/rejects with the SDK response\n5. Your application handles the response\n\n## Configuration\n\n### Global Configuration\n\nThe `configOauthPlatforms` function accepts a second parameter for global settings:\n\n```typescript\nconst { connectSocialPlatform } = configOauthPlatforms(\n  {\n    // Platform configurations\n  },\n  {\n    defaultRedirectURI: \"https://yourapp.com/auth/callback\", // Fallback redirect URI\n  }\n);\n```\n\n**Redirect URI Priority:**\n\n1. Platform-specific `redirectURI` (if set)\n2. Global `defaultRedirectURI` (if set)\n3. `window.location.origin` (fallback)\n\n### Platform-Specific Configuration\n\nEach platform has its own configuration requirements. Here are examples for common platforms:\n\n> **💡 Type Tip:** You can infer the exact configuration type for any platform using `SocialPlatformConfig<\"platformName\">`. For example, `SocialPlatformConfig<\"github\">` will give you the exact type for GitHub's configuration, providing full IntelliSense support.\n\n#### GitHub\n\n```typescript\n{\n  github: {\n    clientId: \"your-github-client-id\",\n    redirectURI: \"http://localhost:3000/auth/callback\",\n    state: \"random-state-string\",\n    scopes: [\"read:user\", \"user:email\"],\n    // Optional\n    codeVerifier: \"pkce-code-verifier\", // For PKCE flow\n    prompt: \"consent\",\n    additionalParams: {\n      // Custom query parameters\n    },\n  }\n}\n```\n\n#### Discord\n\n```typescript\n{\n  discord: {\n    clientId: \"your-discord-client-id\",\n    redirectURI: \"http://localhost:3000/auth/callback\",\n    state: \"random-state-string\",\n    scopes: [\"identify\", \"email\"],\n    prompt: \"consent\",\n  }\n}\n```\n\n#### Google (Auth Code Flow)\n\n```typescript\n{\n  googleAuthCode: {\n    client_id: \"your-google-client-id\",\n    redirect_uri: \"http://localhost:3000/auth/callback\",\n    scope: \"email profile\",\n    // Optional\n    state: \"random-state-string\",\n    hd: \"example.com\", // Hosted domain\n    login_hint: \"user@example.com\",\n  }\n}\n```\n\n#### Google (Token Flow)\n\n```typescript\n{\n  googleAuthToken: {\n    client_id: \"your-google-client-id\",\n    scope: \"email profile\",\n    // Optional\n    state: \"random-state-string\",\n    hd: \"example.com\",\n  }\n}\n```\n\n#### Google One Tap\n\n```typescript\n{\n  googleOneTap: {\n    client_id: \"your-google-client-id\",\n    auto_select: false,\n    cancel_on_tap_outside: true,\n    // See google.accounts.id.IdConfiguration for all options\n  }\n}\n```\n\n#### Apple Sign In\n\n```typescript\n{\n  apple: {\n    clientId: \"your-apple-client-id\",\n    redirectURI: \"https://yourapp.com/auth/callback\",\n    scope: \"email name\",\n    usePopup: true, // or false for redirect flow\n    // See AppleSignInAPI.ClientConfigI for all options\n  }\n}\n```\n\n#### Twitter (OAuth 2.0)\n\n```typescript\n{\n  twitter: {\n    clientId: \"your-twitter-client-id\",\n    redirectURI: \"http://localhost:3000/auth/callback\",\n    state: \"random-state-string\",\n    scopes: [\"users.read\", \"tweet.read\", \"offline.access\"],\n    codeVerifier: \"pkce-code-verifier\", // Required for Twitter\n    // Optional\n    additionalParams: {},\n  }\n}\n```\n\n#### TikTok\n\n```typescript\n{\n  tiktok: {\n    clientKey: \"your-tiktok-client-key\", // Note: uses clientKey, not clientId\n    redirectURI: \"http://localhost:3000/auth/callback\",\n    state: \"random-state-string\",\n    scopes: [\"user.info.basic\"],\n  }\n}\n```\n\n#### Atlassian\n\n```typescript\n{\n  atlassian: {\n    clientId: \"your-atlassian-client-id\",\n    redirectURI: \"http://localhost:3000/auth/callback\",\n    state: \"random-state-string\",\n    scopes: [\"read:jira-user\", \"read:jira-work\"], // Required\n    prompt: \"consent\",\n    additionalParams: {\n      audience: \"api.atlassian.com\",\n    },\n  }\n}\n```\n\n## Complete Authentication Example\n\nHere's a complete example showing how to implement authentication in your application:\n\n```tsx\n// auth.tsx\nimport { useState } from \"react\";\nimport { configOauthPlatforms, isOauthError } from \"@bisham/oauth\";\nimport type { SocialPlatforms } from \"@bisham/oauth\";\n\nconst { connectSocialPlatform } = configOauthPlatforms(\n  {\n    github: {\n      clientId: \"your-github-client-id\",\n      redirectURI: \"http://localhost:3000/auth/callback\",\n      state: \"random-state-string\",\n      scopes: [\"read:user\", \"user:email\"],\n    },\n    googleAuthCode: {\n      client_id: \"your-google-client-id\",\n      redirect_uri: \"http://localhost:3000/auth/callback\",\n      scope: \"email profile\",\n    },\n    discord: {\n      clientId: \"your-discord-client-id\",\n      redirectURI: \"http://localhost:3000/auth/callback\",\n      state: \"random-state-string\",\n      scopes: [\"identify\", \"email\"],\n    },\n  },\n  {\n    defaultRedirectURI: \"http://localhost:3000/auth/callback\",\n  }\n);\n\nexport function AuthPage() {\n  const [loading, setLoading] = useState<string | null>(null);\n  const [error, setError] = useState<string | null>(null);\n\n  const handleSocialLogin = async (platform: SocialPlatforms) => {\n    setLoading(platform);\n    setError(null);\n\n    try {\n      const response = await connectSocialPlatform(platform);\n\n      // Send the response to your backend\n      const result = await fetch(\"/api/auth/social\", {\n        method: \"POST\",\n        headers: { \"Content-Type\": \"application/json\" },\n        body: JSON.stringify({\n          platform,\n          data: response,\n        }),\n      });\n\n      if (!result.ok) {\n        throw new Error(\"Authentication failed\");\n      }\n\n      const user = await result.json();\n      console.log(\"Authenticated user:\", user);\n      // Handle successful authentication (redirect, update state, etc.)\n    } catch (err) {\n      if (isOauthError(err, platform)) {\n        // Handle platform-specific OAuth error\n        console.error(\"OAuth error:\", err.errorResponse);\n        setError(`OAuth error: ${JSON.stringify(err.errorResponse)}`);\n      } else {\n        // Handle other errors\n        console.error(\"Error:\", err);\n        setError(err instanceof Error ? err.message : \"An error occurred\");\n      }\n    } finally {\n      setLoading(null);\n    }\n  };\n\n  return (\n    <div>\n      <h1>Sign in with Social</h1>\n\n      <button\n        onClick={() => handleSocialLogin(\"github\")}\n        disabled={loading !== null}\n      >\n        {loading === \"github\" ? \"Connecting...\" : \"Sign in with GitHub\"}\n      </button>\n\n      <button\n        onClick={() => handleSocialLogin(\"googleAuthCode\")}\n        disabled={loading !== null}\n      >\n        {loading === \"googleAuthCode\" ? \"Connecting...\" : \"Sign in with Google\"}\n      </button>\n\n      <button\n        onClick={() => handleSocialLogin(\"discord\")}\n        disabled={loading !== null}\n      >\n        {loading === \"discord\" ? \"Connecting...\" : \"Sign in with Discord\"}\n      </button>\n\n      {error && <div style={{ color: \"red\" }}>{error}</div>}\n    </div>\n  );\n}\n```\n\n## Error Handling\n\nThe library provides type-safe error handling through the `isOauthError` utility function:\n\n```typescript\nimport { isOauthError } from \"@bisham/oauth\";\n\ntry {\n  const response = await connectSocialPlatform(\"github\");\n  // Handle success\n} catch (error) {\n  if (isOauthError(error, \"github\")) {\n    // TypeScript knows error.errorResponse is GitHub's error type\n    console.error(\"OAuth error:\", error.errorResponse);\n    // error.errorResponse has type: { error: string; error_description?: string; error_uri?: string; state?: string; }\n  } else {\n    // Handle other errors (network, popup blocked, etc.)\n    console.error(\"Other error:\", error);\n  }\n}\n```\n\n### Platform-Specific Error Types\n\nEach platform has its own error response type. For example:\n\n- **GitHub**: `{ error: string; error_description?: string; error_uri?: string; state?: string; }`\n- **Discord**: `{ error: string; error_description?: string; state?: string; }`\n- **Google**: `google.accounts.oauth2.ClientConfigError | google.accounts.oauth2.CodeResponse`\n- **Apple**: `AppleSignInAPI.SignInErrorI`\n\n## API Reference\n\n### `configOauthPlatforms(config, globalConfig?)`\n\nMain configuration function that returns a `connectSocialPlatform` function.\n\n**Parameters:**\n\n- `config`: `ConfigOauthPlatformsProps` - Platform-specific configurations\n- `globalConfig?`: `{ defaultRedirectURI?: string }` - Global configuration options\n\n**Returns:**\n\n- `{ connectSocialPlatform: (platform: SocialPlatforms) => Promise<SocialSuccessResponse<Platform>> }`\n\n### `connectSocialPlatform(platform)`\n\nInitiates OAuth flow for the specified platform.\n\n**Parameters:**\n\n- `platform`: `SocialPlatforms` - The platform to connect to\n\n**Returns:**\n\n- `Promise<SocialSuccessResponse<Platform>>` - Platform-specific success response\n\n**Throws:**\n\n- `OauthError<Platform>` - Platform-specific OAuth error\n- `Error` - Other errors (popup blocked, network errors, etc.)\n\n### `oauthResponseSubscription()`\n\nHandles OAuth redirect callback. Call this function in your redirect/callback page.\n\n**Usage:**\n\n```typescript\nimport { oauthResponseSubscription } from \"@bisham/oauth\";\n\n// Call in your callback page component\noauthResponseSubscription();\n```\n\n### `isOauthError(error, platform)`\n\nType guard to check if an error is a platform-specific OAuth error.\n\n**Parameters:**\n\n- `error`: `unknown` - The error to check\n- `platform`: `SocialPlatforms` - The platform type\n\n**Returns:**\n\n- `boolean` - True if the error is an OAuthError for the specified platform\n\n## Configuration Options\n\n### Common OAuth Options\n\n```typescript\n{\n  clientId?: string;           // OAuth client ID (most platforms)\n  clientKey?: string;          // OAuth client key (TikTok)\n  redirectURI?: string;        // Redirect URI after authorization\n  state?: string;              // State parameter for CSRF protection\n  scopes?: string[];           // Requested scopes\n  codeVerifier?: string;       // PKCE code verifier\n  prompt?: string;             // Prompt parameter (e.g., \"consent\", \"select_account\")\n  accessType?: string;         // Access type (e.g., \"offline\" for refresh tokens)\n  responseType?: string;       // Response type (usually \"code\")\n  display?: string;            // Display mode\n  loginHint?: string;          // Login hint\n  hd?: string;                // Hosted domain (Google)\n  responseMode?: string;       // Response mode\n  additionalParams?: Record<string, string>; // Additional query parameters\n  scopeJoiner?: string;        // Character to join scopes (default: \" \")\n}\n```\n\n## TypeScript Support\n\nThe library is fully typed with TypeScript. All platform configurations, responses, and errors are type-safe:\n\n```typescript\nimport type {\n  SocialPlatforms,\n  SocialSuccessResponse,\n  SocialErrorResponse,\n  SocialPlatformConfig,\n} from \"@bisham/oauth\";\n\n// Platform-specific types\ntype GitHubResponse = SocialSuccessResponse<\"github\">;\ntype GitHubError = SocialErrorResponse<\"github\">;\ntype GitHubConfig = SocialPlatformConfig<\"github\">;\n```\n\n## Browser Support\n\n- Modern browsers with ES6+ support\n- Requires cookie support for redirect handling\n\n## License\n\nMIT\n\n## Author\n\n**Bisham Kunwor**\n\n- Email: novelian.nova@gmail.com\n- Website: https://bishamkunwor.com.np\n","readmeFilename":"README.md"}