Add docs server Dockerfile

This commit is contained in:
2022-06-25 21:10:15 -05:00
parent afbf6e7682
commit 1be73dd347
3 changed files with 6 additions and 6 deletions

View File

@@ -11,12 +11,7 @@ import {ErrorWithContext, uuid4, fetch} from '../../../util'
export class CoreIDLoginProvider extends OAuth2LoginProvider<OAuth2LoginProviderConfig> {
protected async callback(request: Request): Promise<Authenticatable> {
// Get authentication_code from the request
const code = String(request.input('code') || '')
if ( !code ) {
throw new ErrorWithContext('Unable to authenticate user: missing login code', {
input: request.input(),
})
}
const code = request.safe('code').string()
// Get OAuth2 token from CoreID
const token = await this.getToken(code)