all repos — caroster @ e46d9135aa9b183d0dda3aa91c21755852231d13

[Octree] Group carpool to your event https://caroster.io

🐛 Fix Google authentication
Tim Izzo tim@octree.ch
Tue, 30 Aug 2022 13:51:07 +0200
commit

e46d9135aa9b183d0dda3aa91c21755852231d13

parent

1b27f87d317fe2a90cceb3da3943ea4b18ff9676

2 files changed, 13 insertions(+), 1 deletions(-)

jump to
M frontend/hooks/useLoginWithProvider.tsfrontend/hooks/useLoginWithProvider.ts

@@ -5,7 +5,7 @@ const setToken = useAuthStore(s => s.setToken);

const setUser = useAuthStore(s => s.setUser); const loginWithProvider = async (provider: string, search: string) => { - const resultRaw = await fetch(`/auth/${provider}/callback${search}`); + const resultRaw = await fetch(`/api/auth/${provider}/callback${search}`); const result = await resultRaw.json(); if (result.hasOwnProperty('error')) throw result; setToken(result.jwt);
M frontend/next.config.jsfrontend/next.config.js

@@ -12,6 +12,18 @@ {

source: '/api/:slug*', destination: `${STRAPI_URL}/api/:slug*`, }, + { + source: '/admin/:slug*', + destination: `${STRAPI_URL}/admin/:slug*`, + }, + { + source: '/i18n/:slug*', + destination: `${STRAPI_URL}/i18n/:slug*`, + }, + { + source: '/content-manager/:slug*', + destination: `${STRAPI_URL}/content-manager/:slug*`, + }, ]; },