C
C
CHolfield2020-08-22 18:54:01
OAuth
CHolfield, 2020-08-22 18:54:01

How to get information about a VKontakte user from an ASP .Net core application?

Hi all.
I have searched all over the internet and have not found an answer to this question.
The application is based on ASP.NET core 3.1, the AspNet.Security.OAuth.Vkontakte package is added and everything seems to be fine (the user logs in), but there is one point:
how can I access the properties of the logged in user when opening the page? among the available Claims there is neither a name nor a link to an image. Although, when debugging the OnCreatingTicket event, the entire JSON is visible, with all links and so on.
There was an idea to shove the entire JSON into the session and use it from there, but it somehow seems stupid to me. In addition, it is visible only during authorization, if the user enters the site with a cookie (already logged in and the cookie is alive) - there will be a prick. Please help me. Difficulty set to medium.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question