From 3a98d8908d5afefb5aa90769e508b5b7dce1c6c7 Mon Sep 17 00:00:00 2001 From: Andrew B Date: Mon, 3 Aug 2020 18:54:27 +0700 Subject: [PATCH] Updates README --- README.md | 43 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 448f3f7..b7bdfc8 100644 --- a/README.md +++ b/README.md @@ -1 +1,42 @@ -# vk-auth-react-nestjs +# Авторизация через ВК NestJS + React + +Пример реализованной авторизации по способу Authorization code flow на примере NestJS + React. + +[Статья](https://medium.com/@ndrwbv/%D0%B0%D0%B2%D1%82%D0%BE%D1%80%D0%B8%D0%B7%D0%B0%D1%86%D0%B8%D1%8F-%D1%87%D0%B5%D1%80%D0%B5%D0%B7-%D0%B2%D0%BA-nestjs-react-797ff4e36154) + +# Установка + +``` +git clone git@github.com:ndrwbv/vk-auth-react-nestjs.git +cd vk-auth-react-nestjs +``` + +## Backend + +```bash +$ vk-auth-react-nestjs: cd backend +$ vk-auth-react-nestjs/backend: docker-compose up -d +$ vk-auth-react-nestjs/backend: yarn +$ vk-auth-react-nestjs/backend: yarn dev +``` + +## Frontend + +```bash +$ vk-auth-react-nestjs: cd frontend +$ vk-auth-react-nestjs/frontend: yarn +$ vk-auth-react-nestjs/frontend: yarn dev +``` + +# Настройка + +Для работы с вашим приложением необходимо: + +1. Создать приложение во Вконтакте https://vk.com/editapp?act=create +2. Отредактировать файлы .env в папке frontend и backend + +```bash +frontend/.env: REACT_APP_CLIENT_ID -- ID приложения +backend/.env: CLIENT_ID -- ID приложения +backend/.env: CLIENT_SECRET -- Защищённый ключ +```