MCPcopy Create free account
hub / github.com/bewcloud/bewcloud / generateMethodId

Method generateMethodId

lib/models/multi-factor-auth.ts:33–40  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

31
32export class MultiFactorAuthModel {
33 static generateMethodId(): string {
34 const bytes = new Uint8Array(16);
35 crypto.getRandomValues(bytes);
36
37 return Array.from(bytes)
38 .map((byte) => byte.toString(16).padStart(2, '0'))
39 .join('');
40 }
41
42 static enableMethodForUser(
43 user: { extra: Pick<User['extra'], 'multi_factor_auth_methods'> },

Callers 3

postFunction · 0.80
postFunction · 0.80
postFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected