🎎Authentication Integration
To integrate user authentication with your backend system
Authentication Integration Flow

Outline
Summary
Last updated
Was this helpful?
Was this helpful?
// ① Fetch the originally generated string that was passed to the user
const originalMessage = await this.findOne(eoa)
let messageToBeSigned
if (prefix) {
// ② Restore the messageToBeSigned, from the originalMessage, that was signed inside Startrail-sdk-js.
messageToBeSigned = `${prefix}${originalMessage.length.toString()}${originalMessage}`;
} else {
// Write the logic in case the prefix is undefined given the usecase that popup is not hidden
messageToBeSigned = originalMessage
}
// HTTP call to Validator-API (message: messageToBeSigned, signature, address )