User Sign In (through Payloads)
When sending a JSON transaction payload, you can use all XRPL transaction types, including a XUMM specific "pseudo transaction type": SignIn
.
The payload for a SignIn transaction can look like this:
{
"txjson": {
"TransactionType": "SignIn"
}
}
All XUMM payload options are valid for a SignIn transaction.
SignIn specific behaviour
A SignIn transaction will never be submitted to the XRP ledger, as it is an invalid transaction type (XUMM specific pseudo transaction type).
After the user signs your SignIn request, the server to server call (to your configured Webhook location) will receive the signed transaction containing the signed transaction HEX blob.
You can verify the signature using:
https://github.com/XRPL-Labs/verify-xrpl-signature
Sign in with XUMM using OAuth2 / OpenID Connect
If you want to use Xumm as OAuth2 / OpenID Connect compatible identity provider, please read the pages displayed below:
Simple sign in, in a browser (client side) environment
You can easily identify a user & get access to the Xumm SDK to interact with the user, using our OAuth2 compatible sign in flow. Fully OAuth2/OpenID Connect compatible means instant Web2.0/Web3.0 compatibility.
You can see it in action (in a fully client side way) here: https://oauth2-pkce-demo.xumm.dev (source available).
What it comes down to:
- Small piece of JS.
CDN or NPM,<script src="https://xumm.app/assets/cdn/xumm-oauth2-pkce.min.js"></script>
- Init SDK
const auth = new XummPkce('aabbccdeee-apikey')
- Start sign in routine (promise, yields context info (user address, network, etc.) & full SDK):
auth.authorize().then(authorized => {
const {sdk, me} = authorized
console.log('User info', me)
sdk.ping().then(pong => console.log({pong}))
})
Updated 5 months ago