title: Django perform actions after oauth callback
body: <p>I have a project and I want to enable users the option to use their Google/Facebook account in order to sign up/in.</p>
  <p>Also whenever a new user signs up another model (Account) is created and connected with that user. All of that works fine, but now I have a problem.</p>
  <p>When users who use the Continue with Google sign up they should be redirected to the view where I will create an Account with the user that was just created (probably not the best way to do it but I can't find any examples for better ones)</p>
  <p>Now this is where the problem occurs:</p>
  <p>If the email already exists in Users table then the user is not being transferred to the redirect url where I will perform the checks and if the account with that email exists I will show the warning back on the login/register page but rather they get redirected to allauth's <code>...accounts/social/signup/</code> url</p>
  <p>This is what I have:</p>
  <p>settings.py</p>
  <pre><code>LOGIN_REDIRECT_URL = &quot;/account_user/checkouath/&quot;
  </code></pre>
  <p>views.py</p>
  <pre><code>def checkouath(request):
      user = request.user
      oauthUser = SocialAccount.objects.get(user=user)
      # Actions to create new Account and check if User exists are going to be here
  
      return redirect(reverse(&quot;homepage&quot;))
  </code></pre>
  <p>And this is redirect that I have set on Google: <code>http://127.0.0.1:8000/accounts/google/login/callback/</code></p>
  <p>I was thinking that I can change this URL but then I get an error for an incorrect callback.</p>
  <p>Now I'm sure this is a simple problem but I can't figure it out, I was thinking of maybe having some callback handlers but I can't find resources for implementing something like that.</p>