File tree 3 files changed +12
-1
lines changed
3 files changed +12
-1
lines changed Original file line number Diff line number Diff line change 27
27
"require" : " ./src/index.jsx" ,
28
28
"solid" : " ./src/index.jsx"
29
29
},
30
- "./api/*" : " ./src/api/*"
30
+ "./api/*" : " ./src/api/*" ,
31
+ "./server" : " ./src/server/index.js"
31
32
},
32
33
"main" : " src/index.js" ,
33
34
"types" : " ./src/index.d.ts" ,
Original file line number Diff line number Diff line change @@ -8,6 +8,13 @@ declare module '@zentered/auth0-solid-start/api/logout' {
8
8
export default function ( req : APIEvent [ 'request' ] ) : void
9
9
}
10
10
11
+ declare module '@zentered/auth0-solid-start/server' {
12
+ import type { ServerFunctionEvent } from 'solid-start/server'
13
+ import type { Session } from 'solid-start/session/sessions'
14
+
15
+ export function getSession ( event : ServerFunctionEvent ) : Promise < Session >
16
+ }
17
+
11
18
declare module '@zentered/auth0-solid-start' {
12
19
import { Accessor , JSX } from 'solid-js'
13
20
import type { WebAuth } from 'auth0-js'
Original file line number Diff line number Diff line change
1
+ import { storage } from '../session'
2
+ export const getSession = async ( event ) =>
3
+ storage . getSession ( event . request . headers . get ( 'Cookie' ) )
You can’t perform that action at this time.
0 commit comments