update vk auth

This commit is contained in:
smanylov
2026-01-07 19:14:37 +07:00
parent fe5fd79d85
commit d3bbc593a6
4 changed files with 29 additions and 72 deletions
+3 -3
View File
@@ -5,14 +5,14 @@ import { createSession } from '@/app/actions/session';
import { redirect } from 'next/navigation';
export async function vkAuthorization(data : any, codeChallenge: string) {
export async function vkAuthorization(data : any, codeVerifier: string) {
console.log(data);
console.log(codeChallenge);
console.log(codeVerifier);
const { code, state, device_id } = data
try {
const response = await fetch(`${API_BASE_URL}/api/v1/vk/authorization/${code}/${state}/${codeChallenge}/${device_id}`, {
const response = await fetch(`${API_BASE_URL}/api/v1/vk/authorization/${code}/${state}/${codeVerifier}/${device_id}`, {
method: 'GET',
headers: {
"Content-Type": "application/json",