mirror of
https://github.com/KeyZox71/knl_meowscendence.git
synced 2025-12-31 21:56:41 +01:00
Merge pull request #51 from KeyZox71/change-oauth-redir
「🔨」 fix: now redirecting on /
This commit is contained in:
@ -12,6 +12,8 @@ GRAPH_PORT=3000
|
||||
ELK_PORT=5601
|
||||
|
||||
GOOGLE_CALLBACK_URL=https://localhost:8443/api/v1
|
||||
# the url to which the user will be redirected when it logs with google
|
||||
CALLBACK_REDIR=http://localhost:3000
|
||||
GOOGLE_CLIENT_SECRET=susAF
|
||||
GOOGLE_CLIENT_ID=Really
|
||||
|
||||
|
||||
@ -45,9 +45,7 @@ export async function gLogCallback(request, reply, fastify) {
|
||||
path: '/',
|
||||
secure: env !== 'development',
|
||||
sameSite: 'lax',
|
||||
})
|
||||
.code(200)
|
||||
.send({ msg: "Login successful" });
|
||||
}).redirect(process.env.CALLBACK_REDIR);
|
||||
} catch (error) {
|
||||
fastify.log.error(error);
|
||||
reply.code(500).send({ error: 'Internal server error' });
|
||||
|
||||
@ -57,9 +57,7 @@ export async function gRegisterCallback(request, reply, fastify) {
|
||||
path: '/',
|
||||
secure: env !== 'development',
|
||||
sameSite: 'lax',
|
||||
})
|
||||
.code(200)
|
||||
.send({ msg: "Register successful" });
|
||||
}).redirect(process.env.CALLBACK_REDIR);
|
||||
} catch (error) {
|
||||
fastify.log.error(error);
|
||||
reply.code(500).send({ error: 'Internal server error' });
|
||||
|
||||
Reference in New Issue
Block a user