File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
typescript/packages/toolshed/routes/integrations/google-oauth Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 77 storage ,
88} from "@commontools/runner" ;
99import { Context } from "@hono/hono" ;
10-
10+ import { Identity , Signer } from "@commontools/identity" ;
1111// Types
1212export interface TokenData {
1313 token ?: string ;
@@ -146,6 +146,8 @@ export async function fetchUserInfo(accessToken: string): Promise<UserInfo> {
146146 }
147147}
148148
149+ let signer : Signer | undefined ;
150+
149151// Helper function to get auth cell and storage
150152export async function getAuthCellAndStorage ( docLink : DocLink | string ) {
151153 try {
@@ -154,6 +156,11 @@ export async function getAuthCellAndStorage(docLink: DocLink | string) {
154156 ? JSON . parse ( docLink )
155157 : docLink ;
156158
159+ if ( ! signer ) {
160+ signer = await Identity . fromPassphrase ( "toolshed" ) ;
161+ storage . setSigner ( signer ) ;
162+ }
163+
157164 storage . setRemoteStorage ( new URL ( "http://localhost:8000" ) ) ;
158165
159166 // FIXME(ja): the space should be inferred from the doclink - but it isn't there yet
You can’t perform that action at this time.
0 commit comments