Skip to content

Commit fd5e2e6

Browse files
committed
Remove dead code
1 parent 3345422 commit fd5e2e6

File tree

1 file changed

+0
-22
lines changed

1 file changed

+0
-22
lines changed

src/oauth/helpers.ts

-22
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import type { Uuid } from "../uuid";
77

88
const logger = getLogger(["hollo", "oauth"]);
99

10-
const AUTHORIZATION_CODE_SIZE = 32;
1110
const ACCESS_GRANT_SIZE = 64;
1211
const ACCESS_TOKEN_SIZE = 64;
1312
const TEN_MINUTES = 10 * 60 * 1000;
@@ -37,27 +36,6 @@ export async function createAccessGrant(
3736
return { token };
3837
}
3938

40-
export async function createAuthorizationCode(
41-
application_id: Uuid,
42-
account_id: Uuid,
43-
scopes: schema.Scope[],
44-
): Promise<string> {
45-
const code = base64.fromArrayBuffer(
46-
crypto.getRandomValues(new Uint8Array(AUTHORIZATION_CODE_SIZE))
47-
.buffer as ArrayBuffer,
48-
true,
49-
);
50-
51-
await db.insert(schema.accessTokens).values({
52-
accountOwnerId: account_id,
53-
code,
54-
applicationId: application_id,
55-
scopes: scopes,
56-
});
57-
58-
return code;
59-
}
60-
6139
export type AccessToken = {
6240
token: string;
6341
type: "Bearer";

0 commit comments

Comments
 (0)