mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-09-24 05:05:20 -04:00
Merge branch 'fix-socials-p' into 'main'
(auth) attempt to fix social login See merge request PronounsPage/PronounsPage!592
This commit is contained in:
commit
cf0e7de3f6
@ -113,7 +113,7 @@ export default defineNuxtConfig({
|
||||
esbuild: {
|
||||
options: esBuildOptions,
|
||||
},
|
||||
preset: 'node-cluster',
|
||||
// preset: 'node-cluster',
|
||||
},
|
||||
serverHandlers: [
|
||||
{
|
||||
|
@ -38,6 +38,7 @@ import type { SocialProfilePayload } from '../social.ts';
|
||||
import { addMfaInfo } from './mfa.ts';
|
||||
|
||||
import { getLocale, loadConfig, loadTranslator } from '~/server/data.ts';
|
||||
import { getUrlForLocale } from '~/src/domain.ts';
|
||||
import type { Translator } from '~/src/translator.ts';
|
||||
|
||||
export interface UserRow {
|
||||
@ -795,7 +796,7 @@ router.get('/user/social/:provider', handleErrorAsync(async (req, res) => {
|
||||
return `/${config.user.route}`;
|
||||
}
|
||||
const host = env === 'development' || process.env.NUXT_PUBLIC_ENV === 'test'
|
||||
? ''
|
||||
? getUrlForLocale(req.session.socialRedirect)
|
||||
: buildLocaleList(config.locale, true)[req.session.socialRedirect].url;
|
||||
delete req.session.socialRedirect;
|
||||
|
||||
|
@ -18,6 +18,7 @@ export const socialProviders: Record<string, SocialProvider> = {
|
||||
return `^https?://(?:www.)?${p.name.split('@')[1]}/(?:(?:web/)?@|users/)?${p.name.split('@')[0]}/?$`;
|
||||
},
|
||||
avatars: true,
|
||||
redirectViaHome: true,
|
||||
},
|
||||
indieauth: {
|
||||
name: 'IndieAuth',
|
||||
@ -27,6 +28,7 @@ export const socialProviders: Record<string, SocialProvider> = {
|
||||
icon: 'indieauth.png',
|
||||
iconMargin: true,
|
||||
avatars: false,
|
||||
redirectViaHome: true,
|
||||
},
|
||||
discord: {
|
||||
name: 'Discord',
|
||||
|
Loading…
x
Reference in New Issue
Block a user