Remove unused social authentication endpoints and update frontend

Remove deprecated social provider API endpoints from the backend and update the frontend JavaScript to hardcode Google and Discord as the available social login providers.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 9bc9dd7a-5328-4cb7-91de-b3cb33a0c48c
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
This commit is contained in:
pac7
2025-09-21 18:29:03 +00:00
committed by pacnpal
parent 164cc15d90
commit 821c94bc76
4 changed files with 6 additions and 350 deletions

View File

@@ -340,8 +340,11 @@ Alpine.data('authModal', (defaultMode = 'login') => ({
open: false,
mode: defaultMode, // 'login' or 'register'
showPassword: false,
socialProviders: [],
socialLoading: true,
socialProviders: [
{id: 'google', name: 'Google', auth_url: '/accounts/google/login/'},
{id: 'discord', name: 'Discord', auth_url: '/accounts/discord/login/'}
],
socialLoading: false,
// Login form data
loginForm: {
@@ -364,8 +367,6 @@ Alpine.data('authModal', (defaultMode = 'login') => ({
registerError: '',
init() {
this.fetchSocialProviders();
// Listen for auth modal events
this.$watch('open', (value) => {
if (value) {
@@ -377,18 +378,6 @@ Alpine.data('authModal', (defaultMode = 'login') => ({
});
},
async fetchSocialProviders() {
try {
const response = await fetch('/api/v1/auth/social/providers/');
const data = await response.json();
this.socialProviders = data.available_providers || [];
} catch (error) {
console.error('Failed to fetch social providers:', error);
this.socialProviders = [];
} finally {
this.socialLoading = false;
}
},
show(mode = 'login') {
this.mode = mode;