Commit 5da71ca3 authored by Sharad Heft's avatar Sharad Heft

Store the auth ID always, regardless of settings.

parent 563ae3fd
......@@ -38,6 +38,7 @@ class TESTOAuth2Backend(ModelBackend):
defaults={
'access_token': token['access_token'],
'refresh_token': token['refresh_token'],
'auth_id': profile['id']
}
)
......
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('test_oauth', '0002_django20'),
]
operations = [
migrations.AddField(
model_name='testoauth2data',
name='auth_id',
field=models.BigIntegerField(default=0, db_index=True),
preserve_default=False,
),
]
......@@ -31,6 +31,8 @@ class TESTOAuth2Data(models.Model):
related_name='auth'
)
auth_id = models.BigIntegerField(db_index=True)
access_token = models.CharField(max_length=128)
refresh_token = models.CharField(max_length=128)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment