@@ -83,7 +83,11 @@ export default class SessionStore {
83
83
s . label . startsWith ( 'Default Session' ) ,
84
84
) . length ;
85
85
const countText = count === 0 ? '' : `(${ count } )` ;
86
- await this . addSession ( `Default Session ${ countText } ` , MAX_DATE ) ;
86
+ await this . addSession (
87
+ `Default Session ${ countText } ` ,
88
+ LIT . SessionType . TYPE_MACAROON_ADMIN ,
89
+ MAX_DATE ,
90
+ ) ;
87
91
}
88
92
} catch ( error : any ) {
89
93
this . _store . appView . handleError ( error , 'Unable to fetch sessions' ) ;
@@ -93,11 +97,16 @@ export default class SessionStore {
93
97
/**
94
98
* Adds a new session
95
99
* @param label the user defined label for this session
100
+ * @param type the type of session being created (admin, read-only, etc)
96
101
* @param expiry how long the session should be valid for
97
102
* @param mailboxServerAddr the address where the mailbox server is reachable
98
103
* @param devServer whether the mailbox server is a dev server that has no valid TLS cert
99
104
*/
100
- async addSession ( label : string , expiry : Date ) {
105
+ async addSession (
106
+ label : string ,
107
+ type : LIT . SessionTypeMap [ keyof LIT . SessionTypeMap ] ,
108
+ expiry : Date ,
109
+ ) {
101
110
try {
102
111
this . _store . log . info ( `submitting session with label ${ label } ` , {
103
112
expiry,
@@ -107,7 +116,7 @@ export default class SessionStore {
107
116
108
117
const { session } = await this . _store . api . lit . addSession (
109
118
label ,
110
- LIT . SessionType . TYPE_UI_PASSWORD ,
119
+ type ,
111
120
expiry ,
112
121
this . proxyServer ,
113
122
! IS_PROD ,
0 commit comments