Web3Auth
For an alternative social login method you can check Web3Auth. We have a functional Web3Auth Integration Example to show how to integrate Web3Auth into your web app.
Installation
Choose whether to expose your Privy wallet through NEAR Connect or integrate Privy directly into your application:- NEAR Connect
- Direct Privy
Install the plugin, NEAR Connect, and the UI packages used by the signing page:
Which should I choose?
Using NEAR Connect would give your application access to all NEAR Wallets that support NEAR Connect, plus social login with Privy. This will provide an experience closer to Web3 applications. Integrating Privy directly would make your application support only social login (through Privy). This should be the preferred way for applications that want to abstract away the wallet and provide a Web2-like experience to their users.Setup
- NEAR Connect
- Direct Privy
privy-near-connect lets you expose a Privy embedded wallet through NEAR Connect.1
Create a Privy app
Create an application in the Privy dashboard and copy its App ID and Client ID. Store both values in your application’s environment variables:
2
Publish a wallet manifest
Add
manifest.json to your application’s public directory. Replace the example URLs and wallet metadata with your own:3
Create the signing page
Add a
/sign route and render the plugin’s signing component there:allowedOrigins limits which applications can send requests to the signing page. Add every dApp origin that should be able to use the wallet.4
Load the plugin with NEAR Connect
Initialize That’s it! The plugin will now be available in the NEAR Connect modal.
NearConnector with the manifest you created: