Merge pull request #28373 from overleaf/jel-testing-session-for-domain-capture

[web] Testing domain capture before enabling

GitOrigin-RevId: 6ac62b39eedad613748a680aa26624126db8e1c1
This commit is contained in:
Jessica Lawshe
2025-09-22 09:56:05 -05:00
committed by Copybot
parent 38c702ddd4
commit 431e850dc8
3 changed files with 9 additions and 0 deletions

View File

@@ -14,8 +14,15 @@ async function sign(payload, options = {}) {
return token
}
function getDecoded(token) {
const key = Settings.jwt.key
const decoded = JWT.verify(token, key)
return decoded
}
module.exports = {
sign: callbackify(sign),
getDecoded,
promises: {
sign,
},

View File

@@ -506,6 +506,7 @@ async function initialize(webRouter, privateApiRouter, publicApiRouter) {
AuthenticationController.requireLogin(),
RateLimiterMiddleware.rateLimit(rateLimiters.openDashboard),
AsyncLocalStorage.middleware,
await Modules.middleware('domainCaptureTestSession'),
PermissionsController.useCapabilities(),
ProjectListController.projectListPage
)

View File

@@ -113,6 +113,7 @@ export interface Meta {
'ol-detachRole': 'detached' | 'detacher' | ''
'ol-dictionariesRoot': 'string'
'ol-domainCaptureEnabled': boolean | undefined
'ol-domainCaptureTestURL': string | undefined
'ol-dropbox': { error: boolean; registered: boolean }
'ol-editorThemes': string[]
'ol-email': string