Answer the question
In order to leave comments, you need to log in
How to register users through VK?
Good time of the day.
I need to register on the site using VK. I need a popup window with an OAuth VK registration form to appear on the page when the button is clicked. After that, in the same window, you need to display several fields for setting up a user account. At the end - the "Finish" button, by pressing which a user is created in the database and redirected to another URI.
I tried using the django-social-auth library first , but it turned out to be outdated. After that I found the AllAuth library and tried to use it. I almost succeeded, but I stopped at this "beautiful" error:
{
"error": "invalid_request",
"error_description": "redirect_uri is incorrect, check application redirect uri in the settings page"
}
Answer the question
In order to leave comments, you need to log in
django-social-auth deprecated - no longer maintained, project renamed to python social auth .
Python Social Auth - very easy to use, huge number of supported providers, thoughtful links in the models, I highly recommend it.
If you are interested in other packages for Django, I suggest you go to djangopackages.com . This site contains all packages for Django and classified into categories.
You can register directly in the settings of your VK application. For example:
базовый домен - http://localhost:8000
редирект на - htpp://localhost:8000/success/
We go here https://vk.com/dev/openapi
There, in detail, the process of obtaining a token (that is, authorization), user data - where and how to send requests.
Further on the site we will implement all this business.
If the user with the given id is in the database, then this is authorization. Otherwise, we save it in the database and transfer it to the settings page of the created profile.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question