Add LinkedIn OAuth connect with portal-saved app credentials.
Replace manual token paste with Authorization Code flow; store Client ID/secret in the DB from the social accounts UI and surface a copyable callback URL for LinkedIn Auth setup.
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
# Generated manually for SocialAppCredentials
|
||||
|
||||
import uuid
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("social", "0001_initial"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name="SocialAppCredentials",
|
||||
fields=[
|
||||
("created_at", models.DateTimeField(auto_now_add=True)),
|
||||
("updated_at", models.DateTimeField(auto_now=True)),
|
||||
(
|
||||
"id",
|
||||
models.UUIDField(
|
||||
default=uuid.uuid4,
|
||||
editable=False,
|
||||
primary_key=True,
|
||||
serialize=False,
|
||||
),
|
||||
),
|
||||
(
|
||||
"platform",
|
||||
models.CharField(
|
||||
choices=[
|
||||
("facebook", "Facebook"),
|
||||
("instagram", "Instagram"),
|
||||
("linkedin", "LinkedIn"),
|
||||
],
|
||||
max_length=16,
|
||||
unique=True,
|
||||
),
|
||||
),
|
||||
("client_id", models.CharField(blank=True, max_length=255)),
|
||||
("encrypted_client_secret", models.TextField(blank=True)),
|
||||
],
|
||||
options={
|
||||
"verbose_name_plural": "social app credentials",
|
||||
"ordering": ["platform"],
|
||||
},
|
||||
),
|
||||
]
|
||||
Reference in New Issue
Block a user