UNPKG

@turnkey/react-wallet-kit

Version:

The easiest and most powerful way to integrate Turnkey's Embedded Wallets into your React applications.

70 lines (66 loc) 2.15 kB
'use strict'; var sdkTypes = require('@turnkey/sdk-types'); const DISCORD_AUTH_URL = "https://discord.com/oauth2/authorize"; const X_AUTH_URL = "https://x.com/i/oauth2/authorize"; const GOOGLE_AUTH_URL = "https://accounts.google.com/o/oauth2/v2/auth"; const APPLE_AUTH_URL = "https://account.apple.com/auth/authorize"; const FACEBOOK_AUTH_URL = "https://www.facebook.com/v11.0/dialog/oauth"; const FACEBOOK_GRAPH_URL = "https://graph.facebook.com/v11.0/oauth/access_token"; const popupWidth = 500; const popupHeight = 600; /** * Pre-configured OAuth provider settings */ const OAUTH_PROVIDER_CONFIGS = { [sdkTypes.OAuthProviders.GOOGLE]: { provider: sdkTypes.OAuthProviders.GOOGLE, authUrl: GOOGLE_AUTH_URL, scopes: "openid email profile", usesPKCE: false, responseType: "id_token", nonceInParams: true }, [sdkTypes.OAuthProviders.APPLE]: { provider: sdkTypes.OAuthProviders.APPLE, authUrl: APPLE_AUTH_URL, scopes: "", usesPKCE: false, responseType: "code id_token", responseMode: "fragment", nonceInParams: true }, [sdkTypes.OAuthProviders.FACEBOOK]: { provider: sdkTypes.OAuthProviders.FACEBOOK, authUrl: FACEBOOK_AUTH_URL, scopes: "openid", usesPKCE: true, responseType: "code", nonceInParams: true }, [sdkTypes.OAuthProviders.DISCORD]: { provider: sdkTypes.OAuthProviders.DISCORD, authUrl: DISCORD_AUTH_URL, scopes: "identify email", usesPKCE: true, responseType: "code", nonceInParams: false }, [sdkTypes.OAuthProviders.X]: { provider: sdkTypes.OAuthProviders.X, authUrl: X_AUTH_URL, scopes: "tweet.read users.read", usesPKCE: true, responseType: "code", nonceInParams: false } }; exports.APPLE_AUTH_URL = APPLE_AUTH_URL; exports.DISCORD_AUTH_URL = DISCORD_AUTH_URL; exports.FACEBOOK_AUTH_URL = FACEBOOK_AUTH_URL; exports.FACEBOOK_GRAPH_URL = FACEBOOK_GRAPH_URL; exports.GOOGLE_AUTH_URL = GOOGLE_AUTH_URL; exports.OAUTH_PROVIDER_CONFIGS = OAUTH_PROVIDER_CONFIGS; exports.X_AUTH_URL = X_AUTH_URL; exports.popupHeight = popupHeight; exports.popupWidth = popupWidth; //# sourceMappingURL=config.js.map