1. Go to this page and download the library: Download scriptoshi/livewire-siwe library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
scriptoshi / livewire-siwe example snippets
// In your .env file
#https://cloud.reown.com/
APPKIT_PROJECT_ID=your-appkit-project-id
SIWE_CHAIN_ID=1 # Ethereum Mainnet
SIWE_REDIRECT_URL=dashboard
// In AppServiceProvider.php
public function boot()
{
config(['livewire-siwe.user_data_callback' => function ($address, $userData) {
// Customize user data here
$userData['name'] = 'ETH User: ' . substr($address, 0, 6);
return $userData;
}]);
}