Solana NextAuth.js Example
This is an example application to demonstrate how to use NextAuth.js with Solana Wallet Adapter as the sign in option.
Bootstrapped with next-auth-example repository, an adaptation of siwe.
Features
- Easily configurable with different wallets.
- Built-in in-memory auth state persistance.
- User is not required to keep their wallet connected at all times.
- Ready to use database user integration.
Caveat: Does not support Ledger sign in out of the box, as a workaround, you can send a transaction that contains a memo message and process that on the backend to support Ledger devices.
Setup
- Clone repository:
git clone https://github.com/BlockSmith-Labs/solana-next-auth - Install dependencies:
yarn install - Replace variables on the
.env.local.examplefile and rename the file to.env.local - Run with
yarn dev