How to use the vk-io.authErrors function in vk-io

To help you get started, we’ve selected a few vk-io examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ruslang02 / atomos / apps / official / vk / vk.js View on Github external
function initVK() { /* Initializes in the end not to hang the UI when loading */
	const VKIO = require("vk-io");
	VK = VKIO.VK;
	authErrors = VKIO.authErrors;
	vk = new VK({
		appId: 6414462,
		language: "en",
		debug: true
	});
	const implicitFlow = vk.auth.implicitFlowUser();

	implicitFlow.run()
		.then((response) => {
			console.log('Token:', response.token);
			console.log('Expires:', response.expires);

			console.log('Email:', response.email);
			console.log('User ID:', response.user);
		});
	auth = vk.auth;