File tree Expand file tree Collapse file tree 1 file changed +42
-1
lines changed Expand file tree Collapse file tree 1 file changed +42
-1
lines changed Original file line number Diff line number Diff line change 1
- # vk-auth-react-nestjs
1
+ # Авторизация через ВК NestJS + React
2
+
3
+ Пример реализованной авторизации по способу Authorization code flow на примере NestJS + React.
4
+
5
+ [ Статья] ( 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 )
6
+
7
+ # Установка
8
+
9
+ ```
10
+ git clone git@github.com:ndrwbv/vk-auth-react-nestjs.git
11
+ cd vk-auth-react-nestjs
12
+ ```
13
+
14
+ ## Backend
15
+
16
+ ``` bash
17
+ $ vk-auth-react-nestjs: cd backend
18
+ $ vk-auth-react-nestjs/backend: docker-compose up -d
19
+ $ vk-auth-react-nestjs/backend: yarn
20
+ $ vk-auth-react-nestjs/backend: yarn dev
21
+ ```
22
+
23
+ ## Frontend
24
+
25
+ ``` bash
26
+ $ vk-auth-react-nestjs: cd frontend
27
+ $ vk-auth-react-nestjs/frontend: yarn
28
+ $ vk-auth-react-nestjs/frontend: yarn dev
29
+ ```
30
+
31
+ # Настройка
32
+
33
+ Для работы с вашим приложением необходимо:
34
+
35
+ 1 . Создать приложение во Вконтакте https://vk.com/editapp?act=create
36
+ 2 . Отредактировать файлы .env в папке frontend и backend
37
+
38
+ ``` bash
39
+ frontend/.env: REACT_APP_CLIENT_ID -- ID приложения
40
+ backend/.env: CLIENT_ID -- ID приложения
41
+ backend/.env: CLIENT_SECRET -- Защищённый ключ
42
+ ```
You can’t perform that action at this time.
0 commit comments