update vkAuth endpoint
This commit is contained in:
@@ -9,10 +9,10 @@ export async function vkAuthorization(data : any, codeVerifier: string) {
|
|||||||
|
|
||||||
console.log(data);
|
console.log(data);
|
||||||
console.log(codeVerifier);
|
console.log(codeVerifier);
|
||||||
const { code, state } = data
|
const { code, state, device_id } = data
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const response = await fetch(`${API_BASE_URL}/api/v1/vk/authorization/${code}/${state}`, {
|
const response = await fetch(`${API_BASE_URL}/api/v1/vk/authorization/${code}/${state}/${codeVerifier}/${device_id}`, {
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ export default function VKLogin() {
|
|||||||
responseMode: VKID.ConfigResponseMode.Callback,
|
responseMode: VKID.ConfigResponseMode.Callback,
|
||||||
source: VKID.ConfigSource.LOWCODE,
|
source: VKID.ConfigSource.LOWCODE,
|
||||||
scope: 'email phone vkid.personal_info',
|
scope: 'email phone vkid.personal_info',
|
||||||
codeVerifier: codeVerifier
|
codeVerifier: "codeVerifier"
|
||||||
});
|
});
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user