Complete the authentication of a crypto wallet by passing the signature.
Authenticate Crypto Wallet
POST
https://test.stytch.com/v1/crypto_wallets/authenticateBody parameters
crypto_wallet_type* string
crypto_wallet_address* string
signature* string
session_custom_claims map<string, any>
session_duration_minutes int
session_jwt string
session_token string
Response fields
status_code int
request_id string
user_id string
user object
session_jwt string
session_token string
session object
siwe_params object
const stytch = require('stytch');
const client = new stytch.Client({
project_id: 'PROJECT_ID',
secret: 'SECRET',
});
const params = {
crypto_wallet_type: "ethereum",
crypto_wallet_address: "0x6df2dB4Fb3DA35d241901Bd53367770BF03123f1",
signature: "0x0c4f82edc3c818b6beff4b89e0682994e5878074609903cecdfb843241728be32f75949e2fbae63dcccdef97c0e3789a26441f7e11456cc1f2ef79b3a436010f1b",
session_duration_minutes: 60,
};
client.cryptoWallets.authenticate(params)
.then(resp => { console.log(resp) })
.catch(err => { console.log(err) });
RESPONSE
200
{
"status_code": 200,
"request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141",
"user_id": "user-test-16d9ba61-97a1-4ba4-9720-b03761dc50c6",
"user": {...},
"session_token": "mZAYn5aLEqKUlZ_Ad9U_fWr38GaAQ1oFAhT8ds245v7Q",
"session_jwt": "eyJ...",
"session": "{...}"
}