File tree 1 file changed +0
-22
lines changed
1 file changed +0
-22
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,6 @@ import type { Uuid } from "../uuid";
7
7
8
8
const logger = getLogger ( [ "hollo" , "oauth" ] ) ;
9
9
10
- const AUTHORIZATION_CODE_SIZE = 32 ;
11
10
const ACCESS_GRANT_SIZE = 64 ;
12
11
const ACCESS_TOKEN_SIZE = 64 ;
13
12
const TEN_MINUTES = 10 * 60 * 1000 ;
@@ -37,27 +36,6 @@ export async function createAccessGrant(
37
36
return { token } ;
38
37
}
39
38
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
-
61
39
export type AccessToken = {
62
40
token : string ;
63
41
type : "Bearer" ;
You can’t perform that action at this time.
0 commit comments