repositorypackage
0.1.0
Repository: https://github.com/dmitrymomot/solauth.git
Documentation: pkg.go.dev
# Packages
No description provided by the author
# README
solauth
Issuing access token based on signed message by Solana wallet.
Usage
1. Start server
$ ./bin/server
2. Request authorization
$ curl -X POST -H "Content-Type: application/json" -d '{"public_key": "[base58 encoded wallet address]"}' http://localhost:8080/auth/request
3. Sign message
Sign the message with your wallet.
4. Get access token
$ curl -X POST -H "Content-Type: application/json" -d '{"public_key": "[base58 encoded wallet address]", "signature": "[base64 encoded signature]", "message": "[same message from first request]"}' http://localhost:8080/auth/verify
5. Refresh access token
$ curl -X POST -H "Content-Type: application/json" -d '{"refresh_token": "[refresh token from prev req]"}' http://localhost:8080/auth/refresh