change name and default value

This commit is contained in:
einhornimmond 2025-04-08 18:57:54 +02:00
parent 19720ee6ca
commit 9f181a2079
3 changed files with 5 additions and 5 deletions

View File

@ -138,7 +138,7 @@ const gms = {
// koordinates of Illuminz-instance of GMS
GMS_API_URL: process.env.GMS_API_URL ?? 'http://localhost:4044/',
GMS_DASHBOARD_URL: process.env.GMS_DASHBOARD_URL ?? 'http://localhost:8080/',
GMS_PLAYGROUND_ROUTE: process.env.GMS_PLAYGROUND_ROUTE ?? 'usersearch-playground',
GMS_USER_SEARCH_FRONTEND_ROUTE: process.env.GMS_USER_SEARCH_FRONTEND_ROUTE ?? 'user-search',
// used as secret postfix attached at the gms community-auth-url endpoint ('/hook/gms/' + 'secret')
GMS_WEBHOOK_SECRET: process.env.GMS_WEBHOOK_SECRET ?? 'secret',
}

View File

@ -279,11 +279,11 @@ export const schema = Joi.object({
.default('http://localhost:8080/')
.description('The URL for the GMS dashboard'),
GMS_PLAYGROUND_ROUTE: Joi.string()
GMS_USER_SEARCH_FRONTEND_ROUTE: Joi.string()
.pattern(/^[\w_-]*$/)
.default('usersearch-playground')
.default('user-search')
.description(
'gms frontend playground route, playground for standalone playground, usersearch-playground for old',
'gms frontend playground route, user-search for standalone playground, usersearch-playground for old',
),
GMS_WEBHOOK_SECRET: Joi.string()

View File

@ -14,7 +14,7 @@ export async function authenticateGmsUserPlayground(
const result = new GmsUserAuthenticationResult()
const dashboardUrl = ensureUrlEndsWithSlash(CONFIG.GMS_DASHBOARD_URL)
result.url = dashboardUrl.concat(CONFIG.GMS_PLAYGROUND_ROUTE)
result.url = dashboardUrl.concat(CONFIG.GMS_USER_SEARCH_FRONTEND_ROUTE)
result.token = await verifyAuthToken(dbUser.communityUuid, token)
logger.info('GmsUserAuthenticationResult:', result)
return result