delta-auth-next 0.1.26 → 0.1.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
interface DeltaAuthConfig {
|
|
2
|
-
publishableKey
|
|
2
|
+
publishableKey?: string;
|
|
3
3
|
autoRefresh?: boolean;
|
|
4
4
|
refreshInterval?: number;
|
|
5
5
|
showAlerts?: boolean;
|
|
6
6
|
backendUrl?: string;
|
|
7
7
|
authDomain?: string;
|
|
8
8
|
}
|
|
9
|
-
export declare function GetsigninUrl(pathname: string, config: DeltaAuthConfig, origin: string): string
|
|
9
|
+
export declare function GetsigninUrl(pathname: string, config: DeltaAuthConfig, origin: string): string;
|
|
10
10
|
export {};
|
|
11
11
|
//# sourceMappingURL=middleware-helper.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"middleware-helper.d.ts","sourceRoot":"","sources":["../src/middleware-helper.ts"],"names":[],"mappings":"AACA,UAAU,eAAe;IACvB,cAAc,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"middleware-helper.d.ts","sourceRoot":"","sources":["../src/middleware-helper.ts"],"names":[],"mappings":"AACA,UAAU,eAAe;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAGD,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,eAAe,EAAC,MAAM,EAAC,MAAM,UAUnF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"middleware-helper.js","sourceRoot":"","sources":["../src/middleware-helper.ts"],"names":[],"mappings":"AAWA,MAAM,UAAU,YAAY,CAAC,QAAgB,EAAE,MAAuB,EAAC,MAAa;IAClF,IAAI,QAAQ,KAAK,aAAa,EAAE,CAAC;QAC/B,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"middleware-helper.js","sourceRoot":"","sources":["../src/middleware-helper.ts"],"names":[],"mappings":"AAWA,MAAM,UAAU,YAAY,CAAC,QAAgB,EAAE,MAAuB,EAAC,MAAa;IAClF,IAAI,QAAQ,KAAK,aAAa,EAAE,CAAC;QAC/B,MAAM,SAAS,GAAW,GAAG,MAAM,CAAC,UAAU,qBAC5C,MAAM,CAAC,cACT,iBAAiB,kBAAkB,CAAC,MAAM,CAAC,EAAE,CAAC;QAC9C,OAAO,SAAS,CAAA;IAClB,CAAC;SACG,CAAC;QACH,OAAO,QAAQ,CAAA;IACjB,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
package/src/middleware-helper.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// src/middleware-helper.ts
|
|
2
2
|
interface DeltaAuthConfig {
|
|
3
|
-
publishableKey
|
|
3
|
+
publishableKey?: string;
|
|
4
4
|
autoRefresh?: boolean;
|
|
5
5
|
refreshInterval?: number; // ms
|
|
6
6
|
showAlerts?: boolean; // toggle alerts
|
|
@@ -11,12 +11,12 @@ interface DeltaAuthConfig {
|
|
|
11
11
|
|
|
12
12
|
export function GetsigninUrl(pathname: string, config: DeltaAuthConfig,origin:string) {
|
|
13
13
|
if (pathname === '/api/signin') {
|
|
14
|
-
const signinUrl = `${config.authDomain}/signin?client_id=${
|
|
14
|
+
const signinUrl :string = `${config.authDomain}/signin?client_id=${
|
|
15
15
|
config.publishableKey
|
|
16
16
|
}&redirect_uri=${encodeURIComponent(origin)}`;
|
|
17
|
-
return signinUrl
|
|
17
|
+
return signinUrl
|
|
18
18
|
}
|
|
19
19
|
else{
|
|
20
|
-
|
|
20
|
+
return pathname
|
|
21
21
|
}
|
|
22
22
|
}
|