Add Telegram auth flow to backoffice
This commit is contained in:
21
README.md
21
README.md
@@ -102,20 +102,33 @@ This will compile your project and store the build artifacts in the `dist/market
|
||||
```typescript
|
||||
export const environment = {
|
||||
production: false,
|
||||
apiUrl: 'http://localhost:3000/api', // Local backend
|
||||
useMockData: true // Use mock data for development
|
||||
apiUrl: '/api',
|
||||
authApiUrl: '',
|
||||
userSessionApiUrl: '',
|
||||
telegramBot: 'myAMLKYCBOT',
|
||||
useMockData: false
|
||||
};
|
||||
```
|
||||
|
||||
Development runs through `proxy.conf.json`, which forwards `/api` and `/usersession` to `https://api.dexarmarket.ru:445` and `/userauth` plus `/users/sessions` to `https://users.vitanova.network:456`.
|
||||
|
||||
### Production (`src/environments/environment.production.ts`)
|
||||
```typescript
|
||||
export const environment = {
|
||||
production: true,
|
||||
apiUrl: 'https://api.dexarmarket.ru/api', // Production backend
|
||||
useMockData: false // Use real API
|
||||
apiUrl: 'https://api.dexarmarket.ru:445',
|
||||
authApiUrl: 'https://users.vitanova.network:456',
|
||||
userSessionApiUrl: 'https://api.dexarmarket.ru:445',
|
||||
telegramBot: 'myAMLKYCBOT',
|
||||
useMockData: false
|
||||
};
|
||||
```
|
||||
|
||||
Telegram login uses the shared userauth endpoints documented in `marketplaces/docs/telegram-login-dialog.html`:
|
||||
`POST /userauth/qr/create`, `GET /userauth/qr/poll?token=...`, `GET /userauth/session`, and `POST /usersession/{sessionId}`.
|
||||
If the deployed auth backend does not expose `/userauth/*` yet, the same dialog falls back to the current marketplace `/users/sessions` Telegram flow.
|
||||
Short backend checklist in Russian: [BACKEND_AUTH_TODO.ru.md](BACKEND_AUTH_TODO.ru.md).
|
||||
|
||||
## Deployment
|
||||
|
||||
### Prerequisites
|
||||
|
||||
Reference in New Issue
Block a user