mirror of
https://github.com/standardnotes/server
synced 2026-10-17 12:03:09 -04:00
feat: upgrade to node 20.1.0 (#590)
* feat: upgrade node to 20.0.0 * fix(auth): webauthn usage * fix: remove better-sqlite3 driver and unplug newrelic * fix: add sqlite3 lib to packages * chore: upgrade aws-sdk and localstack * fix: specs and node types * tmp: check if installing yarn helps linter and test cancellation issues * Revert "tmp: check if installing yarn helps linter and test cancellation issues" This reverts commiteacb4e28d1. * fix: run tests separately * tmp: downgrade yarn release * Revert "tmp: downgrade yarn release" This reverts commita277454dbe. * feat: upgrade to node 20.1.0 * Revert "fix: run tests separately" This reverts commit5755f2caf9.
This commit is contained in:
+8
-3
@@ -8,8 +8,11 @@ import { AuthenticatorChallenge } from '../../Authenticator/AuthenticatorChallen
|
||||
import { FeatureIdentifier } from '@standardnotes/features'
|
||||
import { FeatureServiceInterface } from '../../Feature/FeatureServiceInterface'
|
||||
import { UserRepositoryInterface } from '../../User/UserRepositoryInterface'
|
||||
import { AuthenticatorTransportFuture, PublicKeyCredentialCreationOptionsJSON } from '@simplewebauthn/typescript-types'
|
||||
|
||||
export class GenerateAuthenticatorRegistrationOptions implements UseCaseInterface<Record<string, unknown>> {
|
||||
export class GenerateAuthenticatorRegistrationOptions
|
||||
implements UseCaseInterface<PublicKeyCredentialCreationOptionsJSON>
|
||||
{
|
||||
constructor(
|
||||
private authenticatorRepository: AuthenticatorRepositoryInterface,
|
||||
private authenticatorChallengeRepository: AuthenticatorChallengeRepositoryInterface,
|
||||
@@ -19,7 +22,9 @@ export class GenerateAuthenticatorRegistrationOptions implements UseCaseInterfac
|
||||
private featureService: FeatureServiceInterface,
|
||||
) {}
|
||||
|
||||
async execute(dto: GenerateAuthenticatorRegistrationOptionsDTO): Promise<Result<Record<string, unknown>>> {
|
||||
async execute(
|
||||
dto: GenerateAuthenticatorRegistrationOptionsDTO,
|
||||
): Promise<Result<PublicKeyCredentialCreationOptionsJSON>> {
|
||||
const userUuidOrError = Uuid.create(dto.userUuid)
|
||||
if (userUuidOrError.isFailed()) {
|
||||
return Result.fail(`Could not generate authenticator registration options: ${userUuidOrError.getError()}`)
|
||||
@@ -59,7 +64,7 @@ export class GenerateAuthenticatorRegistrationOptions implements UseCaseInterfac
|
||||
excludeCredentials: authenticators.map((authenticator) => ({
|
||||
id: authenticator.props.credentialId,
|
||||
type: 'public-key',
|
||||
transports: authenticator.props.transports,
|
||||
transports: authenticator.props.transports as AuthenticatorTransportFuture[],
|
||||
})),
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user