Validate a token. Only Verdocs tokens will be accepted. Most applications can decode tokens locally,
because tokens will be validated when API calls are made anyway. However, high-security applications
may use this endpoint to check if a token has been revoked.
import {Auth} from'@verdocs/js-sdk/Auth';
const {valid} = awaitAuth.validateToken({ token }); if (!valid) { window.alert('Session invalid or expired. Please re-authenticate.'); }
Validate a token. Only Verdocs tokens will be accepted. Most applications can decode tokens locally, because tokens will be validated when API calls are made anyway. However, high-security applications may use this endpoint to check if a token has been revoked.