I
I
Ilya2019-03-03 03:44:55
JavaScript
Ilya, 2019-03-03 03:44:55

How to make VK authorization through React Native Expo?

Hello, please help to release VK authorization on Expo React Native. Didn't find anything useful on the internet. Maybe someone has tried this?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey Panteleev, 2019-03-07
@ynizhenie

If at expo, then try using AuthSession

let redirectUrl = AuthSession.getRedirectUrl();
let result = await AuthSession.startAsync({
    authUrl: 'https://oauth.vk.com/authorize?client_id=<client_id>&display=mobile&redirect_uri=' +
    encodeURIComponent(redirectUrl) + '&response_type=token&v=5.92',
});
if (result.type === 'success') {
    // обрабатываете полученный токен, получаете информацию о пользователе, etc
}

R
Robur, 2019-03-06
@Robur

These guys have obviously tried:
https://github.com/doomsower/react-native-vkontakt...
https://github.com/doochik/react-native-vksdk

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question