File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
src/plus/integrations/authentication Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -147,12 +147,13 @@ abstract class IntegrationAuthenticationProviderBase<ID extends IntegrationId =
147
147
) : Promise < ProviderAuthenticationSession | undefined > {
148
148
const sessionId = this . getSessionId ( descriptor ) ;
149
149
150
- const storedSession = await this . restoreSession ( sessionId ) ;
151
-
152
- let session = storedSession ;
150
+ let session ;
151
+ let storedSession ;
153
152
if ( options ?. forceNewSession ) {
154
- session = undefined ;
155
153
await this . deleteAllSecrets ( sessionId ) ;
154
+ } else {
155
+ storedSession = await this . restoreSession ( sessionId ) ;
156
+ session = storedSession ;
156
157
}
157
158
158
159
const isExpiredSession = session ?. expiresAt != null && new Date ( session . expiresAt ) . getTime ( ) < Date . now ( ) ;
You can’t perform that action at this time.
0 commit comments