1.0.1 • Published 4 months ago
@easywallet/server v1.0.1
EasyWallet Server SDK
Server-side SDK for EasyWallet. Provides authentication with Google OAuth and Wallet (SIWE) on the backend.
Features
- 🔐 OAuth 2.0 Authentication — Secure Google login integration.
- 🦊 Sign-In With Ethereum (SIWE) — Wallet authentication standard.
- 🔑 JWT Token Management — Secure session handling with access tokens.
- 🖥️ Server-side Ready — Designed for Node.js environments.
Installation
npm install @easywallet/server
# or
pnpm add @easywallet/serverUsage
import { createAuthHandler } from '@easywallet/server';
const authHandler = createAuthHandler({
clientId: process.env.GOOGLE_CLIENT_ID!,
clientSecret: process.env.GOOGLE_CLIENT_SECRET!,
jwtSecret: process.env.JWT_SECRET!,
});
// Example usage
const loginUrl = authHandler.getGoogleOAuthUrl();
const userData = await authHandler.authenticateGoogleCallback(code);Environment Variables
- GOOGLE_CLIENT_ID — Google OAuth Client ID
- GOOGLE_CLIENT_SECRET — Google OAuth Client Secret
- JWT_SECRET — Secret used to sign JWTs
License
MIT License © 2025 EasyWallet