Files
speckle-server/packages/server/modules/auth/index.js
T
Iain Sproat 78ecaeffcb Revert structured logging 2 (#1240)
* Revert "'@' shortcut must come after it is configured in bootstrap (#1239)"

This reverts commit 967329473f.

* Revert "Structured logging (attempt 2) (#1234)"

This reverts commit 444d2ca7dd.
2022-12-05 15:46:09 +00:00

26 lines
693 B
JavaScript

'use strict'
const debug = require('debug')
const { registerOrUpdateScope } = require('@/modules/shared')
exports.init = async (app) => {
debug('speckle:modules')('🔑 Init auth module')
// Initialize authn strategies
exports.authStrategies = await require('./strategies')(app)
// Hoist auth routes
require('./rest')(app)
// Register core-based scopes
const scopes = require('./scopes.js')
for (const scope of scopes) {
await registerOrUpdateScope(scope)
}
}
exports.finalize = async () => {
// Note: we're registering the default apps last as we want to ensure that all
// scopes have been registered by any other modules.
await require('./defaultApps')()
}