@privy-io/react-auth 1.23.0-beta.1 → 1.23.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import React, { ReactElement } from 'react';
2
2
  import { ExternalProvider, Web3Provider } from '@ethersproject/providers';
3
3
  import WCProvider from '@walletconnect/web3-provider';
4
4
  import { AbstractProvider } from 'web3-core';
@@ -273,9 +273,32 @@ type PrivyClientConfig = {
273
273
  * Used for buttons, active borders, etc. This will generate light and dark variants.
274
274
  * This overrides the server setting `accent_color`. */
275
275
  accentColor?: HexColor;
276
- /** Logo url for the main privy modal screen.
276
+ /** Logo for the main privy modal screen.
277
+ * This can be a string (url) or an img / svg react element.
278
+ * If passing an element, Privy will overwrite the `style` props, to ensure proper rendering.
277
279
  * This overrides the server setting `logo_url` */
278
- logo?: string;
280
+ logo?: string | ReactElement;
281
+ /** Determines the order of the login options in the privy modal. If true, the wallet login will render above
282
+ * social and email / sms login options.
283
+ * This overrides the server setting `show_wallet_login_first` */
284
+ showWalletLoginFirst?: boolean;
285
+ };
286
+ /** Specified login methods for the privy modal.
287
+ * Existence of options in this list overrides the server settings `wallet_auth`, `email_auth`, `sms_auth`, `google_oauth`, `twitter_oauth`,
288
+ * `discord_oauth`, `github_oauth`, `apple_oauth` (respectively).
289
+ * Only `email` OR `sms` can be specified, not both. If both are specified, `email` will be used.
290
+ * The order of this array does not currently dictate order of the social login methods in the UI. */
291
+ loginMethods?: Array<'wallet' | 'email' | 'sms' | 'google' | 'twitter' | 'discord' | 'github' | 'apple'>;
292
+ /** All legal configuration */
293
+ legal?: {
294
+ /** URL to the terms and conditions page for your application.
295
+ * Rendered as a link in the privy modal footer.
296
+ * This overrides the server setting `terms_and_conditions_url` */
297
+ termsAndConditionsUrl?: string | null;
298
+ /** URL to the privacy policy page for your application.
299
+ * Rendered as a link in the privy modal footer.
300
+ * This overrides the server setting `privacy_policy_url` */
301
+ privacyPolicyUrl?: string | null;
279
302
  };
280
303
  };
281
304
  interface AllowlistConfig {