curl --request POST \
--url http://localhost:8080/cabinet/auth/oauth/{provider}/callback \
--header 'Content-Type: application/json' \
--data '
{
"code": "<string>",
"state": "<string>",
"campaign_slug": "<string>",
"referral_code": "<string>"
}
'{
"access_token": "<string>",
"refresh_token": "<string>",
"expires_in": 123,
"user": {
"id": 123,
"created_at": "2023-11-07T05:31:56Z",
"telegram_id": 123,
"username": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"email_verified": false,
"balance_kopeks": 0,
"balance_rubles": 0,
"referral_code": "<string>",
"language": "ru",
"auth_type": "telegram"
},
"token_type": "bearer",
"campaign_bonus": {
"campaign_name": "<string>",
"bonus_type": "<string>",
"balance_kopeks": 0,
"subscription_days": 123,
"tariff_name": "<string>"
}
}Handle OAuth callback: exchange code, find/create user, return JWT.
curl --request POST \
--url http://localhost:8080/cabinet/auth/oauth/{provider}/callback \
--header 'Content-Type: application/json' \
--data '
{
"code": "<string>",
"state": "<string>",
"campaign_slug": "<string>",
"referral_code": "<string>"
}
'{
"access_token": "<string>",
"refresh_token": "<string>",
"expires_in": 123,
"user": {
"id": 123,
"created_at": "2023-11-07T05:31:56Z",
"telegram_id": 123,
"username": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"email_verified": false,
"balance_kopeks": 0,
"balance_rubles": 0,
"referral_code": "<string>",
"language": "ru",
"auth_type": "telegram"
},
"token_type": "bearer",
"campaign_bonus": {
"campaign_name": "<string>",
"bonus_type": "<string>",
"balance_kopeks": 0,
"subscription_days": 123,
"tariff_name": "<string>"
}
}Successful Response
Full authentication response with tokens and user.