
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
VK ID SDK — это библиотека для безопасной и удобной авторизации пользователей в вашем сервисе через VK ID.
ℹ️ Версия VK ID SDK 2.3.0 поддерживает авторизацию по протоколу OAuth 2.1, а также способы входа через аккаунты Одноклассников и Mail.
NPM:
npm i @vkid/sdk@^2.0.0
YARN:
yarn add @vkid/sdk@^2.0.0
PNPM:
pnpm add @vkid/sdk@^2.0.0
CDN:
<script src="https://unpkg.com/@vkid/sdk@<3.0.0/dist-sdk/umd/index.js"></script>
Обратите внимание: Для работы авторизации нужен APP_ID. Вы получите его, когда создадите приложение в кабинете подключения VK ID.
import * as VKID from '@vkid/sdk';
VKID.Config.init({
app: APP_ID,
redirectUrl: 'https://example.com',
state: 'state',
codeVerifier: 'codeVerifier',
scope: 'phone email',
});
const authButton = document.createElement('button');
authButton.onclick = () => {
// После авторизации будет редирект на адрес, указанный в параметре redirectUrl
VKID.Auth.login()
.catch(console.error);
};
document.getElementById('container').appendChild(authButton);
import * as VKID from '@vkid/sdk';
VKID.Config.init({
app: APP_ID,
redirectUrl: 'https://example.com',
state: 'state',
codeVerifier: 'codeVerifier',
scope: 'phone email',
});
const oneTap = new VKID.OneTap();
const container = document.getElementById('VkIdSdkOneTap');
if (container) {
oneTap
.render({ container })
.on(VKID.WidgetEvents.ERROR, console.error);
}
Проект VK ID SDK имеет открытый исходный код на GitHub, и вы можете присоединиться к его доработке — мы будем благодарны за внесение улучшений и исправление возможных ошибок.
Если вы собираетесь вносить изменения в проект VK ID SDK, следуйте правилам разработки. Они помогут понять, какие действия возможны, а какие недопустимы.
В руководстве вы можете подробно ознакомиться с процессом разработки и узнать, как предлагать улучшения и исправления, а ещё — как добавлять и тестировать свои изменения в VK ID SDK. Также рекомендуем ознакомиться с общими правилами оформления кода в проекте.
2.3.3 (09-10-2024)
FAQs
VK ID Web SDK
The npm package @vkid/sdk receives a total of 2,666 weekly downloads. As such, @vkid/sdk popularity was classified as popular.
We found that @vkid/sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.