Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ndrwbv/vk-auth-react-nestjs

πŸ“ [Article] VK Auth in NestJS + React
https://github.com/ndrwbv/vk-auth-react-nestjs

auth authorization-code-flow nestjs react vk vk-api vkontakte

Last synced: 2 months ago
JSON representation

πŸ“ [Article] VK Auth in NestJS + React

Awesome Lists containing this project

README

        

# Авторизация Ρ‡Π΅Ρ€Π΅Π· Π’Πš 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 [email protected]: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 -- Π—Π°Ρ‰ΠΈΡ‰Ρ‘Π½Π½Ρ‹ΠΉ ΠΊΠ»ΡŽΡ‡
```