Express x JWT x Sign In with Solana API server minimal example.
For experiment purpose only. I highly recommend to do security vulnerability assesments before launch.
- Express.js(API Mode)
- JWT: node-jsonwebtoken
- Sign: Sign Message
% npm i
% npm run dev
Import Postman request.
Then request API using Postman:
- http://localhost:4100/auths/create-message
- http://localhost:4100/auths/sign-message
- http://localhost:4100/auths/verify-signature
- http://localhost:4100/auths/sign-in
- http://localhost:4100/auths/verify-jwt
Phantom make new standard Sign In With Solana (SIWS).
- Follow Sign In With (SIW) standards(EIP-4361)
- Encrypt JWT using jose
If you need to full-stack, use Blocksmith-Labs/solana-next-auth (build with NextAuth.js and Next.js).
