ΠΠ²ΡΠΎΡΠΈΠ·Π°ΡΠΈΡ ΡΠ΅ΡΠ΅Π· ΠΠ NestJS + React
ΠΡΠΈΠΌΠ΅Ρ ΡΠ΅Π°Π»ΠΈΠ·ΠΎΠ²Π°Π½Π½ΠΎΠΉ Π°Π²ΡΠΎΡΠΈΠ·Π°ΡΠΈΠΈ ΠΏΠΎ ΡΠΏΠΎΡΠΎΠ±Ρ Authorization code flow Π½Π° ΠΏΡΠΈΠΌΠ΅ΡΠ΅ NestJS + React.
Π£ΡΡΠ°Π½ΠΎΠ²ΠΊΠ°
git clone git@github.com:ndrwbv/vk-auth-react-nestjs.git
cd vk-auth-react-nestjs
Backend
$ 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
$ vk-auth-react-nestjs: cd frontend
$ vk-auth-react-nestjs/frontend: yarn
$ vk-auth-react-nestjs/frontend: yarn dev
ΠΠ°ΡΡΡΠΎΠΉΠΊΠ°
ΠΠ»Ρ ΡΠ°Π±ΠΎΡΡ Ρ Π²Π°ΡΠΈΠΌ ΠΏΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΠ΅ΠΌ Π½Π΅ΠΎΠ±Ρ ΠΎΠ΄ΠΈΠΌΠΎ:
- Π‘ΠΎΠ·Π΄Π°ΡΡ ΠΏΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΠ΅ Π²ΠΎ ΠΠΊΠΎΠ½ΡΠ°ΠΊΡΠ΅ https://vk.com/editapp?act=create
- ΠΡΡΠ΅Π΄Π°ΠΊΡΠΈΡΠΎΠ²Π°ΡΡ ΡΠ°ΠΉΠ»Ρ .env Π² ΠΏΠ°ΠΏΠΊΠ΅ frontend ΠΈ backend
frontend/.env: REACT_APP_CLIENT_ID -- ID ΠΏΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΡ
backend/.env: CLIENT_ID -- ID ΠΏΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΡ
backend/.env: CLIENT_SECRET -- ΠΠ°ΡΠΈΡΡΠ½Π½ΡΠΉ ΠΊΠ»ΡΡ