fix refresh cookie settings
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2022-01-05 08:11:18 +01:00
parent 22075489c2
commit 2a51e0a753
5 changed files with 11 additions and 6 deletions

View File

@@ -14,7 +14,7 @@ interface AccessSettings {
include_refresh_token?: boolean
refresh_token_expires_in?: number
redirect_to?: string
data?: Record<string, unknown>,
data?: unknown,
leave_open?: boolean
}

View File

@@ -19,6 +19,7 @@ type Gateway = (
interface RefreshSettings extends AccessSettings {
leave_open?: never;
redirect_to?: never;
data?: never;
}
interface GatewayOptions {
@@ -134,7 +135,8 @@ class GatewayClass {
);
const refresh_result = await auth_request.allow_access ({
...this._options.refresh_settings,
leave_open: true
data: ver.data,
leave_open: true
});
const con = req.connection as unknown as Record<string, unknown>;
@@ -171,5 +173,6 @@ export {
AnyFunc,
Gateway,
GatewayOptions,
GatewayClass
GatewayClass,
RefreshSettings
};

View File

@@ -27,7 +27,8 @@ import create_gateway, {
GatewayOptions,
GatewayClass,
Gateway,
AnyFunc
AnyFunc,
RefreshSettings
} from './Gateway';
import keystore, {
KeyStore, KeyStoreExport,
@@ -57,6 +58,7 @@ export {
GatewayOptions,
GatewayClass,
Gateway,
RefreshSettings,
AnyFunc,
KeyStore,
KeyStoreExport,