1.0.1 • Published 4 months ago

@easywallet/server v1.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
4 months ago

EasyWallet Server SDK

npm npm GitHub stars

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/server

Usage

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

1.0.1

4 months ago

1.0.0

5 months ago