Authenticate jeuxvideo.com users.
- An user wants to authenticate to your application with their jeuxvideo.com username.
- You generate a nonce and ask them to send it in a private mesage to a bot user you own.
- When the user confirm they're done, check the bot private messages for the nonce.
- If the nonce is found, the user is authenticated.
You need to override the
jvc property with a logged in instance
(in a bot account) so the library can access the bot private messages.
You can use the
method to go through the login/password/captcha process. But you're
encouraged to do this just once and store the cookie to reuse it. In the
example below, I assume you already have a valid cookie.
const defaultAuth =const auth = defaultAuth
Generate a nonce
// Get nonce buffer.const nonce = await auth// Nice encoding of the nonce to show to the user.const displayNonce = auth
Verify a message
if await auth// The user is authenticated.
demo directory, which contains a concrete usage
example with an Express web app.