0
0
Fork 0

Change the authentication to use the custom auth password on any path that starts with /discord/auth in order to also catch the callback instead of having infinite password prompt looping

This commit is contained in:
Oliver-Akins 2021-07-23 13:22:18 -06:00
parent 62981bd390
commit 1c9d01ea22

View file

@ -48,7 +48,7 @@ async function init() {
async validate(request: Request, user: string, pass: string, h: ResponseToolkit) { async validate(request: Request, user: string, pass: string, h: ResponseToolkit) {
// Are we attempting to authenticate, then use the auth password // Are we attempting to authenticate, then use the auth password
if (request.path === `/discord/auth`) { if (request.path.startsWith(`/discord/auth`)) {
return { return {
isValid: config.discord.auth_password === pass, isValid: config.discord.auth_password === pass,
credentials: { pass }, credentials: { pass },