Handles popup window creation and polling for OAuth authentication.
// Source: https://github.com/MomenSherif/react-oauth | License: MIT | Copyright 2022 Mo'men Sherif
// Provided via justclaw.it.com; keep this notice with the code.
import { OAuthError } from './OAuthError';
/**
* Options for configuring the popup window
*/
export type PopupWindowOptions = {
/** Height of the popup window in pixels */
height?: number;
/** Width of the popup window in pixels */
width?: number;
/** Left position of the popup window in pixels */
left?: number;
/** Top position of the popup window in pixels */
top?: number;
};
/**
* Response data from the OAuth popup
*/
export type OAuthResponse = {
/** The authorization code returned by GitHub */
code: string;
/** Optional state parameter for CSRF protection */
state?: string;
/** Optional erro
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key