`https://api.unipos.org/users/nonce?address=${0x{string}}`
`https://api.unipos.org/users/verify`
import { SiweMessage } from 'siwe'
import { useSignMessage } from 'wagmi'
const { signMessageAsync } = useSignMessage()
const message = new SiweMessage({
address: `0x${string}`,
chainId: number,
domain: window.location.host,
nonce: string,
statement: 'Sign in with the Blockchain to Unipos.',
uri: window.location.origin,
version: '1',
})
const signature = await signMessageAsync({
message: message.prepareMessage()
})
body: { message, signature }
// With Cookie header 'access_token'
body: {
address: `0x${string}`
role: string
}
`https://api.unipos.org/users/identify`
// With Cookie header 'access_token'
body: {
address: `0x${string}`
role: string
}
`https://api.unipos.org/users/logout`
// With Cookie header 'access_token'