@revojs/auth 0.2.4 → 0.2.6
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.
- package/dist/index.js +1 -1
- package/dist/module/index.d.ts +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -69,7 +69,7 @@ function clearSession(scope) {
|
|
|
69
69
|
function defineAuthProvider(provider) {
|
|
70
70
|
return { async fetch(scope) {
|
|
71
71
|
const defaults = provider.setup(scope);
|
|
72
|
-
const options = mergeObjects(
|
|
72
|
+
const options = mergeObjects(config.providers?.[defaults.issuer] ?? {}, defaults);
|
|
73
73
|
const { origin, protocol } = useUrl(scope);
|
|
74
74
|
const { code, state, redirect, error } = useQuery(scope);
|
|
75
75
|
const secure = protocol === "https:";
|
package/dist/module/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CookieOptions } from "@revojs/server";
|
|
2
|
-
import type { AuthProviderOptions } from "@revojs/auth";
|
|
2
|
+
import type { AuthProviderOptions, Providers } from "@revojs/auth";
|
|
3
3
|
import type { Mergeable } from "revojs/shared";
|
|
4
4
|
export interface SessionOptions {
|
|
5
5
|
name: string;
|
|
@@ -7,7 +7,7 @@ export interface SessionOptions {
|
|
|
7
7
|
}
|
|
8
8
|
export interface AuthConfig {
|
|
9
9
|
session: SessionOptions;
|
|
10
|
-
providers?: Record<string, Mergeable<Pick<AuthProviderOptions, "scope" | "pkce" | "authorize" | "token" | "userInfo"
|
|
10
|
+
providers?: Partial<Record<Providers | (string & {}), Mergeable<Pick<AuthProviderOptions, "scope" | "pkce" | "authorize" | "token" | "userInfo">>>>;
|
|
11
11
|
}
|
|
12
12
|
declare const _default: import("revojs/module").Module<"auth", AuthConfig, []>;
|
|
13
13
|
export default _default;
|