gemi 0.120.1 → 0.122.0
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/auth/AuthController.d.ts +14 -0
- package/dist/auth/AuthController.d.ts.map +1 -1
- package/dist/auth/config.d.ts +16 -0
- package/dist/auth/config.d.ts.map +1 -1
- package/dist/auth/connections/ConnectionManager.d.ts +33 -8
- package/dist/auth/connections/ConnectionManager.d.ts.map +1 -1
- package/dist/auth/connections/ConnectionStore.d.ts.map +1 -1
- package/dist/auth/connections/ConnectionsController.d.ts.map +1 -1
- package/dist/auth/connections/InstagramConnectionProvider.d.ts +80 -0
- package/dist/auth/connections/InstagramConnectionProvider.d.ts.map +1 -0
- package/dist/auth/connections/OAuthConnectionProvider.d.ts +91 -5
- package/dist/auth/connections/OAuthConnectionProvider.d.ts.map +1 -1
- package/dist/auth/connections/errors.d.ts +1 -1
- package/dist/auth/connections/errors.d.ts.map +1 -1
- package/dist/auth/oauth/InstagramOAuthProvider.d.ts +46 -0
- package/dist/auth/oauth/InstagramOAuthProvider.d.ts.map +1 -0
- package/dist/auth/oauth/OAuthProvider.d.ts +13 -0
- package/dist/auth/oauth/OAuthProvider.d.ts.map +1 -1
- package/dist/auth/oauth/instagram.d.ts +114 -0
- package/dist/auth/oauth/instagram.d.ts.map +1 -0
- package/dist/auth/oauth/metaSignedRequest.d.ts +43 -0
- package/dist/auth/oauth/metaSignedRequest.d.ts.map +1 -0
- package/dist/auth/types.d.ts +2 -1
- package/dist/auth/types.d.ts.map +1 -1
- package/dist/{chunk-cytq2msw.js → chunk-2yw4yezc.js} +1 -1
- package/dist/{chunk-s6vvqsd0.js → chunk-3rvn9a76.js} +1 -1
- package/dist/chunk-3s21p9n2.js +57 -0
- package/dist/{chunk-b5a5vvkk.js.map → chunk-3s21p9n2.js.map} +7 -7
- package/dist/{chunk-ar4d3vmr.js → chunk-dyp0wg9e.js} +1 -1
- package/dist/chunk-rhek27sj.js +71 -0
- package/dist/chunk-rhek27sj.js.map +13 -0
- package/dist/{chunk-qphjhpad.js → chunk-shfe0b22.js} +2 -2
- package/dist/{chunk-qphjhpad.js.map → chunk-shfe0b22.js.map} +1 -1
- package/dist/console/run.js +1 -1
- package/dist/facades/Connections.d.ts +12 -5
- package/dist/facades/Connections.d.ts.map +1 -1
- package/dist/facades/index.js +1 -1
- package/dist/http/index.js +1 -1
- package/dist/i18n/index.js +1 -1
- package/dist/kernel/index.js +1 -1
- package/dist/server/index.js +1 -1
- package/dist/services/index.d.ts +10 -2
- package/dist/services/index.d.ts.map +1 -1
- package/dist/services/index.js +15 -15
- package/dist/services/index.js.map +7 -3
- package/package.json +1 -1
- package/dist/chunk-1xdrs2hx.js +0 -71
- package/dist/chunk-1xdrs2hx.js.map +0 -13
- package/dist/chunk-b5a5vvkk.js +0 -57
- /package/dist/{chunk-cytq2msw.js.map → chunk-2yw4yezc.js.map} +0 -0
- /package/dist/{chunk-s6vvqsd0.js.map → chunk-3rvn9a76.js.map} +0 -0
- /package/dist/{chunk-ar4d3vmr.js.map → chunk-dyp0wg9e.js.map} +0 -0
|
@@ -116,6 +116,20 @@ export declare class AuthController extends Controller {
|
|
|
116
116
|
session: import("./types").SessionWithUser;
|
|
117
117
|
redirectTo: string;
|
|
118
118
|
}>;
|
|
119
|
+
/**
|
|
120
|
+
* A first sign-in through a provider with `createUsersWithoutEmail`: the
|
|
121
|
+
* user (no email, nothing to verify) and its `SocialAccount`, in one
|
|
122
|
+
* transaction with `onUserCreated`.
|
|
123
|
+
*
|
|
124
|
+
* Not a route — `protected` keeps it off the controller's public surface.
|
|
125
|
+
*/
|
|
126
|
+
protected createOAuthUserWithoutEmail(args: {
|
|
127
|
+
provider: string;
|
|
128
|
+
providerId: string;
|
|
129
|
+
name?: string;
|
|
130
|
+
username?: string;
|
|
131
|
+
locale: string;
|
|
132
|
+
}): Promise<User>;
|
|
119
133
|
/**
|
|
120
134
|
* A refused OAuth callback: the reason code and the page the sign-in was
|
|
121
135
|
* meant to return to. With `auth.oauthFailurePath` set, the browser is
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthController.d.ts","sourceRoot":"","sources":["../../auth/AuthController.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AASlD,OAAO,KAAK,EAAc,IAAI,EAAE,MAAM,SAAS,CAAC;AA+FhD;;;;;GAKG;AACH,eAAO,MAAM,cAAc,MAAM,CAAC;AAElC,yFAAyF;AACzF,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAItD;AA2BD,cAAM,aAAc,SAAQ,WAAW,CACrC;IACE,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB,EACD,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CACvB;IACC,MAAM;;;;;;;;;MASJ;CACH;AAED,cAAM,qBAAsB,SAAQ,WAAW,CAC7C;IACE,KAAK,EAAE,MAAM,CAAC;CACf,EACD,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CACvB;IACC,MAAM;;;;;MAKJ;CACH;AAED,cAAM,oBAAqB,SAAQ,WAAW,CAC5C;IACE,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;CACf,EACD,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CACvB;IACC,MAAM;;;;;MAKJ;CACH;AAED,qBAAa,cAAe,SAAQ,UAAU;IACtC,EAAE;IAUF,WAAW,CAAC,GAAG;eAA4B,MAAM;6BAAK;;;IAsBtD,mBAAmB,CAAC,GAAG,4DAAoB;;;;;;;IAwCjD;;;;;OAKG;YACW,gBAAgB;IA0BxB,eAAe,CACnB,GAAG;eAA4B,MAAM;aAAO,MAAM;6BAAK;IAqBnD,aAAa,CAAC,GAAG;eAA4B,MAAM;aAAO,MAAM;6BAAK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E;QACrC,QAAQ,EAAE,MAAM,CAAC;QACjB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,2CAA2C;QAC3C,KAAK,EAAE,MAAM,CAAC;QACd,mFAAmF;QACnF,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,MAAM,EAAE,MAAM,CAAC;QACf;;;;WAIG;QACH,YAAY,CAAC,EAAE,OAAO,CAAC;QACvB;;;WAGG;QACH,UAAU,CAAC,EAAE,OAAO,CAAC;KACtB,GAAG,OAAO,CACT;QAAE,IAAI,EAAE,IAAI,CAAC;QAAC,MAAM,EAAE,QAAQ,GAAG,QAAQ,CAAA;KAAE,GAAG,gBAAgB,GAAG,iBAAiB,GAAG,IAAI,CAC1F;IAsGK,oBAAoB,CAAC,GAAG;eAA4B,MAAM;6BAAK;;;IA0BrE;;;;;;;OAOG;IACG,gBAAgB,CAAC,GAAG;eAA4B,MAAM;6BAAK;;;IAuBjE;;;;;;;;;OASG;IACG,eAAe,CACnB,GAAG;eAA4B,MAAM;cAAQ,MAAM;eAAS,MAAM;6BAAK;;;;CAiF1E"}
|
package/dist/auth/config.d.ts
CHANGED
|
@@ -85,6 +85,13 @@ export interface ConnectedArgs {
|
|
|
85
85
|
/** The key under `auth.connections`. */
|
|
86
86
|
provider: string;
|
|
87
87
|
connection: ProviderConnection;
|
|
88
|
+
/**
|
|
89
|
+
* What the provider said about the account while connecting, when its
|
|
90
|
+
* connection provider reports it (`InstagramConnectionProvider`: `id`,
|
|
91
|
+
* `user_id`, `username`, `name`, `account_type`, `profile_picture_url`).
|
|
92
|
+
* Not stored by gemi: keep what you need. `null` otherwise.
|
|
93
|
+
*/
|
|
94
|
+
profile: Record<string, unknown> | null;
|
|
88
95
|
req: HttpRequest<any, any>;
|
|
89
96
|
}
|
|
90
97
|
/** What `onAuthenticated` is handed. */
|
|
@@ -172,6 +179,15 @@ export interface AuthConfig {
|
|
|
172
179
|
* instead.
|
|
173
180
|
*/
|
|
174
181
|
oauthFailurePath?: string | null;
|
|
182
|
+
/**
|
|
183
|
+
* Where a successful OAuth sign-in sends a user who has **no email** (one
|
|
184
|
+
* created through a provider with `createUsersWithoutEmail`, such as
|
|
185
|
+
* Instagram), instead of the intended page, which rides along as
|
|
186
|
+
* `?redirect=`. A same-origin path: a page that asks for an email and
|
|
187
|
+
* saves it (verify it before trusting it). `null`, the default, sends them
|
|
188
|
+
* on like everyone else.
|
|
189
|
+
*/
|
|
190
|
+
oauthCompleteProfilePath?: string | null;
|
|
175
191
|
/**
|
|
176
192
|
* Providers a user can connect their account to, to call the provider's API
|
|
177
193
|
* on their behalf (as opposed to `oauthProviders`, which sign in). The key
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../auth/config.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AACrD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAErF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEpD,uCAAuC;AACvC,MAAM,WAAW,iBAAiB;IAChC,0CAA0C;IAC1C,KAAK,EAAE,MAAM,CAAC;IACd,2DAA2D;IAC3D,IAAI,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IACd,wEAAwE;IACxE,SAAS,EAAE,OAAO,CAAC;IACnB,GAAG,EAAE,WAAW,CAAC,GAAG,EAAE,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D,wBAAgB,iBAAiB,CAAC,MAAM,GAAE,eAAoB,GAAG,QAAQ,CAAC,eAAe,CAAC,CAiCzF;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,kBAAkB,CACtC,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAC9B,OAAO,CAAC,OAAO,CAAC,CASlB;AAED,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,UAAU,GAAG,UAAU,CAE/D;AAID,wBAAgB,kBAAkB,CAChC,MAAM,GAAE,UAAe,GACtB,QAAQ,CAAC,UAAU,CAAC,CAiDtB"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { type ConnectionRecord, type ConnectionStore } from "./ConnectionStore";
|
|
2
|
-
import { type OAuthConnectionProvider, type OAuthTokenSet } from "./OAuthConnectionProvider";
|
|
2
|
+
import { type ConnectionRefreshReason, type OAuthConnectionProvider, type OAuthTokenSet } from "./OAuthConnectionProvider";
|
|
3
3
|
/** A user, as far as a connection is concerned: anything with an `id`. */
|
|
4
4
|
export type ConnectionOwner = {
|
|
5
5
|
id: string | number;
|
|
6
6
|
} | string | number;
|
|
7
|
+
/** See `ProviderConnection.status`. */
|
|
8
|
+
export type ConnectionStatus = "connected" | "needs_reconnect";
|
|
7
9
|
/** What `Connections.fake` answers an API request with. */
|
|
8
10
|
export type FakeConnectionHandler = (request: Request) => Response | Promise<Response>;
|
|
9
11
|
export interface ConnectionManagerOptions {
|
|
@@ -28,18 +30,33 @@ export declare class ConnectionManager {
|
|
|
28
30
|
/** The store connections are kept in. */
|
|
29
31
|
get store(): ConnectionStore;
|
|
30
32
|
provider(name: string): OAuthConnectionProvider;
|
|
31
|
-
/**
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
/**
|
|
34
|
+
* The user's connection to `provider`, or `null` when they have not
|
|
35
|
+
* connected it. With `accountId`, only the connection to that account
|
|
36
|
+
* (`providerAccountId`). For a provider with `multiple: true` and no
|
|
37
|
+
* `accountId`, the account added most recently; use `list(user,
|
|
38
|
+
* provider)` for all of them.
|
|
39
|
+
*/
|
|
40
|
+
for(user: ConnectionOwner, provider: string, accountId?: string): Promise<ProviderConnection | null>;
|
|
41
|
+
/** Every connection the user has, or only those to `provider`. */
|
|
42
|
+
list(user: ConnectionOwner, provider?: string): Promise<ProviderConnection[]>;
|
|
35
43
|
/**
|
|
36
44
|
* Stores tokens for the user, replacing any earlier connection to the same
|
|
37
|
-
* provider
|
|
38
|
-
*
|
|
45
|
+
* provider — or, for a provider with `multiple: true`, to the same account
|
|
46
|
+
* (`providerAccountId`, required there). The connect callback calls this;
|
|
47
|
+
* call it yourself for tokens obtained some other way.
|
|
39
48
|
*/
|
|
40
49
|
save(user: ConnectionOwner, provider: string, tokens: Partial<OAuthTokenSet> & {
|
|
41
50
|
accessToken: string;
|
|
42
51
|
}): Promise<ProviderConnection>;
|
|
52
|
+
/**
|
|
53
|
+
* The configured provider a stored connection belongs to: the store key
|
|
54
|
+
* itself, or `<name>` of a multiple-account provider's `<name>:<account id>`.
|
|
55
|
+
* `null` for a provider no longer configured.
|
|
56
|
+
*
|
|
57
|
+
* @internal
|
|
58
|
+
*/
|
|
59
|
+
providerName(key: string): string | null;
|
|
43
60
|
/**
|
|
44
61
|
* Fakes every provider's API: connections live in memory, `fetch` answers
|
|
45
62
|
* through `handlers[provider]` (recorded in `fakeRequests`), and nothing
|
|
@@ -61,7 +78,7 @@ export declare class ConnectionManager {
|
|
|
61
78
|
*
|
|
62
79
|
* @internal
|
|
63
80
|
*/
|
|
64
|
-
refresh(record: ConnectionRecord): Promise<ConnectionRecord>;
|
|
81
|
+
refresh(record: ConnectionRecord, reason?: ConnectionRefreshReason): Promise<ConnectionRecord>;
|
|
65
82
|
private refreshOnce;
|
|
66
83
|
private withLock;
|
|
67
84
|
}
|
|
@@ -73,6 +90,7 @@ export declare class ProviderConnection {
|
|
|
73
90
|
private readonly manager;
|
|
74
91
|
private record;
|
|
75
92
|
constructor(manager: ConnectionManager, record: ConnectionRecord);
|
|
93
|
+
/** The provider's name under `auth.connections`. */
|
|
76
94
|
get provider(): string;
|
|
77
95
|
get userId(): string;
|
|
78
96
|
get providerAccountId(): string | null;
|
|
@@ -82,6 +100,12 @@ export declare class ProviderConnection {
|
|
|
82
100
|
/** A refresh was refused: the user has to connect again. */
|
|
83
101
|
get needsReconnect(): boolean;
|
|
84
102
|
get connectedAt(): Date;
|
|
103
|
+
/**
|
|
104
|
+
* What to show the user: `"needs_reconnect"` when a refresh was refused, or
|
|
105
|
+
* when the access token has expired and there is no refresh token to renew
|
|
106
|
+
* it; `"connected"` otherwise. Read without calling the provider.
|
|
107
|
+
*/
|
|
108
|
+
get status(): ConnectionStatus;
|
|
85
109
|
/** Whether every one of `scopes` was granted. */
|
|
86
110
|
hasScopes(...scopes: string[]): boolean;
|
|
87
111
|
/**
|
|
@@ -122,6 +146,7 @@ export declare class ProviderConnection {
|
|
|
122
146
|
scopes: string[];
|
|
123
147
|
expiresAt: Date;
|
|
124
148
|
needsReconnect: boolean;
|
|
149
|
+
status: ConnectionStatus;
|
|
125
150
|
connectedAt: Date;
|
|
126
151
|
};
|
|
127
152
|
private current;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConnectionManager.d.ts","sourceRoot":"","sources":["../../../auth/connections/ConnectionManager.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,eAAe,EAGrB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,
|
|
1
|
+
{"version":3,"file":"ConnectionManager.d.ts","sourceRoot":"","sources":["../../../auth/connections/ConnectionManager.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,eAAe,EAGrB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,KAAK,aAAa,EAEnB,MAAM,2BAA2B,CAAC;AAEnC,0EAA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O,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAcrD;;;;;GAKG;AACH,qBAAa,qBAAsB,SAAQ,UAAU;IAC7C,OAAO,CAAC,GAAG,4DAAoB,GAAG,OAAO,CAAC;QAAE,WAAW,EAAE,MAAM,CAAA;KAAE,CAAC;IA2BlE,QAAQ,CAAC,GAAG,4DAAoB,GAAG,OAAO,CAAC;QAAE,WAAW,EAAE,MAAM,CAAA;KAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"ConnectionsController.d.ts","sourceRoot":"","sources":["../../../auth/connections/ConnectionsController.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAcrD;;;;;GAKG;AACH,qBAAa,qBAAsB,SAAQ,UAAU;IAC7C,OAAO,CAAC,GAAG,4DAAoB,GAAG,OAAO,CAAC;QAAE,WAAW,EAAE,MAAM,CAAA;KAAE,CAAC;IA2BlE,QAAQ,CAAC,GAAG,4DAAoB,GAAG,OAAO,CAAC;QAAE,WAAW,EAAE,MAAM,CAAA;KAAE,CAAC;IA+DzE;;;;OAIG;IACH,SAAS,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,KAAK;CAS5E"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { type OAuthTokenSet, OAuthConnectionProvider } from "./OAuthConnectionProvider";
|
|
2
|
+
import { type InstagramEndpoints } from "../oauth/instagram";
|
|
3
|
+
export interface InstagramConnectionProviderConfig extends InstagramEndpoints {
|
|
4
|
+
/** The Instagram app id. Default `process.env.INSTAGRAM_CLIENT_ID`. */
|
|
5
|
+
clientId?: string;
|
|
6
|
+
/** The Instagram app secret. Default `process.env.INSTAGRAM_CLIENT_SECRET`. */
|
|
7
|
+
clientSecret?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Default `["instagram_business_basic", "instagram_business_content_publish"]`.
|
|
10
|
+
* Keep `instagram_business_basic`: without it Instagram refuses refreshes.
|
|
11
|
+
*/
|
|
12
|
+
scopes?: string[];
|
|
13
|
+
/**
|
|
14
|
+
* One user may connect several Instagram accounts, told apart by the
|
|
15
|
+
* Instagram account id. Default `false`. See `OAuthConnectionProviderConfig.multiple`.
|
|
16
|
+
*/
|
|
17
|
+
multiple?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Extra authorization URL parameters: `{ force_reauth: "true" }` asks for
|
|
20
|
+
* the Instagram login again (to connect a second account while the browser
|
|
21
|
+
* is signed into the first), `{ enable_fb_login: "false" }` hides the
|
|
22
|
+
* Facebook login option.
|
|
23
|
+
*/
|
|
24
|
+
authorizationParams?: Record<string, string>;
|
|
25
|
+
/** Default `${HOST_NAME}/auth/connections/<name>/callback`. Register it with Meta. */
|
|
26
|
+
redirectUri?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Refresh this long before the token expires. Default 10 days: every use of
|
|
29
|
+
* the connection in the last 10 of its 60 days renews it. A connection not
|
|
30
|
+
* used for 60 days expires; renew idle ones from a scheduled job
|
|
31
|
+
* (`connection.refresh()`).
|
|
32
|
+
*/
|
|
33
|
+
refreshLeewaySeconds?: number;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* An Instagram professional account (business or creator), connected through
|
|
37
|
+
* the Instagram API with Instagram Login, to read it and publish to it:
|
|
38
|
+
*
|
|
39
|
+
* ```ts
|
|
40
|
+
* connections: {
|
|
41
|
+
* instagram: new InstagramConnectionProvider({
|
|
42
|
+
* scopes: ["instagram_business_basic", "instagram_business_content_publish"],
|
|
43
|
+
* multiple: true,
|
|
44
|
+
* }),
|
|
45
|
+
* }
|
|
46
|
+
* ```
|
|
47
|
+
*
|
|
48
|
+
* The code exchange also trades the short-lived token for a long-lived one
|
|
49
|
+
* (60 days) and reads `/me`; `providerAccountId` is the Instagram account id
|
|
50
|
+
* (`user_id`, the `<IG_ID>` of `/<IG_ID>/media`), and `onConnected` gets the
|
|
51
|
+
* profile. Refreshing renews the access token itself (`ig_refresh_token`):
|
|
52
|
+
* there is no refresh token. Instagram has no revocation endpoint, so
|
|
53
|
+
* `revoke()` throws `revoke_unsupported`; use `disconnect()`.
|
|
54
|
+
*
|
|
55
|
+
* `connection.fetch` sends the token as the `access_token` query parameter
|
|
56
|
+
* (the only placement Meta documents), to `https://graph.instagram.com` only,
|
|
57
|
+
* and treats a 400 with OAuthException code 190 like a 401: it refreshes and
|
|
58
|
+
* retries once, and marks the connection when the grant is gone.
|
|
59
|
+
*/
|
|
60
|
+
export declare class InstagramConnectionProvider extends OAuthConnectionProvider {
|
|
61
|
+
readonly instagram: Required<Omit<InstagramEndpoints, "graphApiVersion">> & Pick<InstagramEndpoints, "graphApiVersion">;
|
|
62
|
+
constructor(config?: InstagramConnectionProviderConfig);
|
|
63
|
+
/**
|
|
64
|
+
* The code for a short-lived token, that for a long-lived one, and `/me`
|
|
65
|
+
* for the account.
|
|
66
|
+
*/
|
|
67
|
+
exchangeCode(args: {
|
|
68
|
+
code: string;
|
|
69
|
+
codeVerifier: string;
|
|
70
|
+
redirectUri: string;
|
|
71
|
+
}): Promise<OAuthTokenSet>;
|
|
72
|
+
/** Instagram has no refresh token; the connection renews through `refreshStrategy`. */
|
|
73
|
+
refresh(): Promise<OAuthTokenSet>;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* A 401, or the Graph API's answer to a dead token: a 400 whose error `code`
|
|
77
|
+
* is 190 (`OAuthException`: expired, revoked, or the app was removed).
|
|
78
|
+
*/
|
|
79
|
+
export declare function isInstagramTokenRejected(response: Response): Promise<boolean>;
|
|
80
|
+
//# sourceMappingURL=InstagramConnectionProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InstagramConnectionProvider.d.ts","sourceRoot":"","sources":["../../../auth/connections/InstagramConnectionProvider.ts"],"names":[],"mappings":"AACA,OAAO,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|
/** The provider's authorization endpoint: `https://www.figma.com/oauth`. */
|
|
3
3
|
authorizeUrl: string;
|
|
4
|
-
/** The token endpoint, for the code exchange and refreshes. */
|
|
4
|
+
/** The token endpoint, for the code exchange (and refreshes, unless `refreshUrl` says otherwise). */
|
|
5
5
|
tokenUrl: string;
|
|
6
|
+
/**
|
|
7
|
+
* Where refresh tokens are spent, for a provider with a refresh endpoint of
|
|
8
|
+
* its own: Figma refreshes at `https://api.figma.com/v1/oauth/refresh`.
|
|
9
|
+
* Default `tokenUrl`.
|
|
10
|
+
*/
|
|
11
|
+
refreshUrl?: string;
|
|
12
|
+
/**
|
|
13
|
+
* The `grant_type` sent with a refresh. Default `"refresh_token"` (RFC 6749
|
|
14
|
+
* §6). `false` leaves it out, for a refresh endpoint that documents only
|
|
15
|
+
* `refresh_token` (Figma's).
|
|
16
|
+
*/
|
|
17
|
+
refreshGrantType?: string | false;
|
|
6
18
|
/**
|
|
7
19
|
* The RFC 7009 revocation endpoint. Without one, `revoke()` is refused and
|
|
8
20
|
* `disconnect()` (which forgets the tokens locally) is the way to remove a
|
|
@@ -16,7 +28,7 @@ export interface OAuthConnectionProviderConfig {
|
|
|
16
28
|
/** How `scopes` are joined on the authorization URL. Default `" "` (RFC 6749). */
|
|
17
29
|
scopeSeparator?: string;
|
|
18
30
|
/**
|
|
19
|
-
* How the client authenticates to the token and revocation endpoints:
|
|
31
|
+
* How the client authenticates to the token, refresh and revocation endpoints:
|
|
20
32
|
* `"body"` sends `client_id` and `client_secret` as form fields (what most
|
|
21
33
|
* providers document), `"basic"` sends them as HTTP Basic credentials.
|
|
22
34
|
* Default `"body"`.
|
|
@@ -45,7 +57,67 @@ export interface OAuthConnectionProviderConfig {
|
|
|
45
57
|
apiBaseUrl: string;
|
|
46
58
|
/** Refresh this many seconds before the access token expires. Default 60. */
|
|
47
59
|
refreshLeewaySeconds?: number;
|
|
60
|
+
/**
|
|
61
|
+
* How a connection is refreshed, for a provider that does not spend a
|
|
62
|
+
* refresh token at a token endpoint. Instagram, for one, renews the
|
|
63
|
+
* long-lived access token itself (`ig_refresh_token`) and issues no refresh
|
|
64
|
+
* token. Unset, a refresh spends the refresh token at `refreshUrl`, and a
|
|
65
|
+
* connection without one has to be reconnected once its token expires.
|
|
66
|
+
*
|
|
67
|
+
* Resolve the new tokens, or `null` when there is nothing to refresh yet
|
|
68
|
+
* (the current token is kept, and nothing is marked). Throw
|
|
69
|
+
* `OAuthConnectionError` with the HTTP `status` for a refusal: a 4xx (other
|
|
70
|
+
* than `invalid_client`) marks the connection `needs_reconnect`, anything
|
|
71
|
+
* else leaves it alone.
|
|
72
|
+
*/
|
|
73
|
+
refreshStrategy?: ConnectionRefreshStrategy;
|
|
74
|
+
/**
|
|
75
|
+
* Lets a user connect more than one account at this provider (several
|
|
76
|
+
* Instagram accounts to post to). Connections are then told apart by
|
|
77
|
+
* `providerAccountId`, which the exchange must supply; connecting an
|
|
78
|
+
* account again replaces only that account's connection. Default `false`:
|
|
79
|
+
* one connection per user, and connecting again replaces it.
|
|
80
|
+
*/
|
|
81
|
+
multiple?: boolean;
|
|
82
|
+
/**
|
|
83
|
+
* How `connection.fetch` sends the token: `"header"` (the default) as
|
|
84
|
+
* `Authorization: Bearer`, `"query"` as an `access_token` query parameter,
|
|
85
|
+
* for an API that documents only that (Instagram's Graph API). Either way
|
|
86
|
+
* the token goes only to `apiBaseUrl`'s origin.
|
|
87
|
+
*/
|
|
88
|
+
tokenPlacement?: "header" | "query";
|
|
89
|
+
/**
|
|
90
|
+
* Whether an API response says the access token itself was refused, which
|
|
91
|
+
* makes `connection.fetch` refresh and retry once. Default: the status is
|
|
92
|
+
* 401. Instagram also answers a dead token with a 400 whose error `code` is
|
|
93
|
+
* 190. Read `response.clone()`, never the response itself: it is handed
|
|
94
|
+
* back to the caller when this answers `false`. Clone only once the status
|
|
95
|
+
* says it could be a refusal, so a large success body is not buffered twice.
|
|
96
|
+
*/
|
|
97
|
+
isTokenRejected?: (response: Response) => boolean | Promise<boolean>;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Why a connection is being refreshed: its token is about to expire, the API
|
|
101
|
+
* refused it, or the app called `connection.refresh()`.
|
|
102
|
+
*/
|
|
103
|
+
export type ConnectionRefreshReason = "expiring" | "rejected" | "requested";
|
|
104
|
+
/** What a `refreshStrategy` is handed: the connection's current grant. */
|
|
105
|
+
export interface ConnectionRefreshContext {
|
|
106
|
+
accessToken: string;
|
|
107
|
+
refreshToken: string | null;
|
|
108
|
+
scopes: string[];
|
|
109
|
+
expiresAt: Date | null;
|
|
110
|
+
/** When the current access token was stored (the last connect or refresh). */
|
|
111
|
+
issuedAt: Date;
|
|
112
|
+
providerAccountId: string | null;
|
|
113
|
+
/**
|
|
114
|
+
* Why: `"rejected"` when the API just refused the token, so a strategy that
|
|
115
|
+
* would otherwise wait (`null`) should treat the grant as gone.
|
|
116
|
+
*/
|
|
117
|
+
reason: ConnectionRefreshReason;
|
|
48
118
|
}
|
|
119
|
+
/** See `OAuthConnectionProviderConfig.refreshStrategy`. */
|
|
120
|
+
export type ConnectionRefreshStrategy = (context: ConnectionRefreshContext) => Promise<OAuthTokenSet | null>;
|
|
49
121
|
/** What a token endpoint answered, normalised. */
|
|
50
122
|
export interface OAuthTokenSet {
|
|
51
123
|
accessToken: string;
|
|
@@ -60,6 +132,11 @@ export interface OAuthTokenSet {
|
|
|
60
132
|
* (Figma's `user_id_string`; `user_id` or `account_id` otherwise).
|
|
61
133
|
*/
|
|
62
134
|
providerAccountId: string | null;
|
|
135
|
+
/**
|
|
136
|
+
* What the provider said about the account at connect time (Instagram's
|
|
137
|
+
* username and picture, say), handed to `onConnected` and not stored.
|
|
138
|
+
*/
|
|
139
|
+
profile?: Record<string, unknown>;
|
|
63
140
|
}
|
|
64
141
|
/**
|
|
65
142
|
* A provider an app can connect a user's account to, to call its API on the
|
|
@@ -71,6 +148,9 @@ export interface OAuthTokenSet {
|
|
|
71
148
|
* figma: new OAuthConnectionProvider({
|
|
72
149
|
* authorizeUrl: "https://www.figma.com/oauth",
|
|
73
150
|
* tokenUrl: "https://api.figma.com/v1/oauth/token",
|
|
151
|
+
* refreshUrl: "https://api.figma.com/v1/oauth/refresh",
|
|
152
|
+
* refreshGrantType: false,
|
|
153
|
+
* clientAuth: "basic",
|
|
74
154
|
* clientId: process.env.FIGMA_CLIENT_ID!,
|
|
75
155
|
* clientSecret: process.env.FIGMA_CLIENT_SECRET!,
|
|
76
156
|
* scopes: ["file_content:read"],
|
|
@@ -80,8 +160,13 @@ export interface OAuthTokenSet {
|
|
|
80
160
|
* ```
|
|
81
161
|
*/
|
|
82
162
|
export declare class OAuthConnectionProvider {
|
|
83
|
-
readonly config: Required<Omit<OAuthConnectionProviderConfig, "revokeUrl" | "redirectUri">> & Pick<OAuthConnectionProviderConfig, "revokeUrl" | "redirectUri">;
|
|
163
|
+
readonly config: Required<Omit<OAuthConnectionProviderConfig, "revokeUrl" | "redirectUri" | "refreshUrl" | "refreshStrategy" | "isTokenRejected">> & Pick<OAuthConnectionProviderConfig, "revokeUrl" | "redirectUri" | "refreshUrl" | "refreshStrategy" | "isTokenRejected">;
|
|
84
164
|
constructor(config: OAuthConnectionProviderConfig);
|
|
165
|
+
/**
|
|
166
|
+
* Whether `response` refuses the access token itself: `isTokenRejected`
|
|
167
|
+
* when configured, else a 401.
|
|
168
|
+
*/
|
|
169
|
+
isTokenRejected(response: Response): Promise<boolean>;
|
|
85
170
|
/** The URL to send the browser to. */
|
|
86
171
|
authorizationUrl(args: {
|
|
87
172
|
state: string;
|
|
@@ -95,8 +180,9 @@ export declare class OAuthConnectionProvider {
|
|
|
95
180
|
redirectUri: string;
|
|
96
181
|
}): Promise<OAuthTokenSet>;
|
|
97
182
|
/**
|
|
98
|
-
* Spends `refreshToken` for a new access token
|
|
99
|
-
*
|
|
183
|
+
* Spends `refreshToken` for a new access token at `refreshUrl` (default
|
|
184
|
+
* `tokenUrl`). A provider that does not rotate refresh tokens (Figma)
|
|
185
|
+
* answers without one, and the old one is kept.
|
|
100
186
|
*/
|
|
101
187
|
refresh(refreshToken: string, scopes: string[]): Promise<OAuthTokenSet>;
|
|
102
188
|
/** Revokes `token` at the provider (RFC 7009). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OAuthConnectionProvider.d.ts","sourceRoot":"","sources":["../../../auth/connections/OAuthConnectionProvider.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,6BAA6B;IAC5C,4EAA4E;IAC5E,YAAY,EAAE,MAAM,CAAC;IACrB
|
|
1
|
+
{"version":3,"file":"OAuthConnectionProvider.d.ts","sourceRoot":"","sources":["../../../auth/connections/OAuthConnectionProvider.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,6BAA6B;IAC5C,4EAA4E;IAC5E,YAAY,EAAE,MAAM,CAAC;IACrB,qGAAqG;IACrG,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IAClC;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,6BAA6B;IAC7B,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,kFAAkF;IAClF,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC9B,kGAAkG;IAClG,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7C;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;OAKG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB,6EAA6E;IAC7E,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B;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
export type OAuthConnectionErrorCode = "unknown_provider" | "exchange_failed" | "refresh_failed" | "reconnect_required" | "revoke_failed" | "revoke_unsupported" | "forbidden_url";
|
|
6
|
+
export type OAuthConnectionErrorCode = "unknown_provider" | "exchange_failed" | "refresh_failed" | "reconnect_required" | "revoke_failed" | "revoke_unsupported" | "forbidden_url" | "missing_account_id";
|
|
7
7
|
export declare class OAuthConnectionError extends Error {
|
|
8
8
|
readonly code: OAuthConnectionErrorCode;
|
|
9
9
|
readonly status?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../auth/connections/errors.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,MAAM,wBAAwB,GAChC,kBAAkB,GAClB,iBAAiB,GACjB,gBAAgB,GAChB,oBAAoB,GACpB,eAAe,GACf,oBAAoB,GACpB,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../auth/connections/errors.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,MAAM,wBAAwB,GAChC,kBAAkB,GAClB,iBAAiB,GACjB,gBAAgB,GAChB,oBAAoB,GACpB,eAAe,GACf,oBAAoB,GACpB,eAAe,GACf,oBAAoB,CAAC;AAEzB,qBAAa,oBAAqB,SAAQ,KAAK;IAK3C,QAAQ,CAAC,IAAI,EAAE,wBAAwB;IAJzC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;gBAGrB,IAAI,EAAE,wBAAwB,EACvC,OAAO,EAAE,MAAM,EACf,OAAO,GAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,aAAa,CAAC,EAAE,MAAM,CAAA;KAAO;CAO7E;AAED;;;;;;GAMG;AACH,qBAAa,2BAA4B,SAAQ,oBAAoB;IAEjE,QAAQ,CAAC,QAAQ,EAAE,MAAM;gBAAhB,QAAQ,EAAE,MAAM,EACzB,OAAO,GAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,aAAa,CAAC,EAAE,MAAM,CAAA;KAAO;CAS7E"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { HttpRequest } from "../../http/HttpRequest";
|
|
2
|
+
import { type InstagramEndpoints } from "./instagram";
|
|
3
|
+
import { type OAuthAuthorizationContext, OAuthProvider, type OAuthProfile } from "./OAuthProvider";
|
|
4
|
+
export interface InstagramOAuthProviderConfig extends InstagramEndpoints {
|
|
5
|
+
/** The Instagram app id. Default `process.env.INSTAGRAM_CLIENT_ID`. */
|
|
6
|
+
clientId: string;
|
|
7
|
+
/** The Instagram app secret. Default `process.env.INSTAGRAM_CLIENT_SECRET`. */
|
|
8
|
+
clientSecret: string;
|
|
9
|
+
/** Default `["instagram_business_basic"]`, which is all sign-in needs. */
|
|
10
|
+
scopes: string[];
|
|
11
|
+
/**
|
|
12
|
+
* The callback path, on `HOST_NAME`: the `redirect_uri` of both the
|
|
13
|
+
* authorization URL and the code exchange. Default `/auth/oauth/instagram/callback`.
|
|
14
|
+
*/
|
|
15
|
+
redirectPath: string;
|
|
16
|
+
/** Extra authorization URL parameters, e.g. `{ enable_fb_login: "false" }` or `{ force_reauth: "true" }`. */
|
|
17
|
+
authorizationParams: Record<string, string>;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* "Sign in with Instagram", through the Instagram API with Instagram Login.
|
|
21
|
+
* Only Instagram professional accounts (business or creator) can sign in.
|
|
22
|
+
*
|
|
23
|
+
* ```ts
|
|
24
|
+
* oauthProviders: { instagram: new InstagramOAuthProvider() }
|
|
25
|
+
* ```
|
|
26
|
+
*
|
|
27
|
+
* The account's identity (`providerId`) is its Instagram account id
|
|
28
|
+
* (`user_id`), the same id `InstagramConnectionProvider` stores as
|
|
29
|
+
* `providerAccountId`. **Instagram returns no email**, so this provider sets
|
|
30
|
+
* `createUsersWithoutEmail`: a first sign-in creates a user with no email,
|
|
31
|
+
* linked by its `SocialAccount`, and `auth.oauthCompleteProfilePath` can send
|
|
32
|
+
* such users to a page that asks for one. Turn it off
|
|
33
|
+
* (`provider.createUsersWithoutEmail = false`) to let only users who linked
|
|
34
|
+
* Instagram to an existing account sign in with it.
|
|
35
|
+
*/
|
|
36
|
+
export declare class InstagramOAuthProvider extends OAuthProvider {
|
|
37
|
+
createUsersWithoutEmail: boolean;
|
|
38
|
+
linkByEmail: boolean;
|
|
39
|
+
config: InstagramOAuthProviderConfig;
|
|
40
|
+
constructor(config?: Partial<InstagramOAuthProviderConfig>);
|
|
41
|
+
/** `HOST_NAME` + `redirectPath`, the same for the authorization and the exchange. */
|
|
42
|
+
redirectUri(): string;
|
|
43
|
+
getRedirectUrl(_req?: HttpRequest, ctx?: OAuthAuthorizationContext): string;
|
|
44
|
+
onCallback(req: HttpRequest): Promise<OAuthProfile>;
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=InstagramOAuthProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InstagramOAuthProvider.d.ts","sourceRoot":"","sources":["../../../auth/oauth/InstagramOAuthProvider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAGL,KAAK,kBAAkB,EAKxB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,KAAK,yBAAyB,EAE9B,aAAa,EACb,KAAK,YAAY,EAClB,MAAM,iBAAiB,CAAC;AAEzB,MAAM,WAAW,4BAA6B,SAAQ,kBAAkB;IACtE,uEAAuE;IACvE,QAAQ,EAAE,MAAM,CAAC;IACjB,+EAA+E;IAC/E,YAAY,EAAE,MAAM,CAAC;IACrB,0EAA0E;IAC1E,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB;;;OAGG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB,6GAA6G;IAC7G,mBAAmB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC7C;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,qBAAa,sBAAuB,SAAQ,aAAa;IAC9C,uBAAuB,UAAQ;IAE/B,WAAW,UAAS;IAE7B,MAAM,EAAE,4BAA4B,CAAC;gBAEzB,MAAM,GAAE,OAAO,CAAC,4BAA4B,CAAM;IAY9D,qFAAqF;IACrF,WAAW;IAIX,cAAc,CAAC,IAAI,CAAC,EAAE,WAAW,EAAE,GAAG,CAAC,EAAE,yBAAyB;IAgB5D,UAAU,CAAC,GAAG,EAAE,WAAW,GAAG,OAAO,CAAC,YAAY,CAAC;CAkC1D"}
|
|
@@ -70,6 +70,19 @@ export declare abstract class OAuthProvider {
|
|
|
70
70
|
* signs in.
|
|
71
71
|
*/
|
|
72
72
|
createUsers?: boolean;
|
|
73
|
+
/**
|
|
74
|
+
* Whether a first sign-in may create a user **without an email**, for a
|
|
75
|
+
* provider that never returns one (Instagram). `false` (the default)
|
|
76
|
+
* refuses an unlinked identity without an email with `missing_email`.
|
|
77
|
+
*
|
|
78
|
+
* When `true`, such an identity (it must have a `providerId`) gets a new
|
|
79
|
+
* user whose `email` is `null`, linked by a `SocialAccount` row: the account
|
|
80
|
+
* is the provider identity, and it signs back in by it. The user model's
|
|
81
|
+
* `email` has to be nullable (`String? @unique`, as in the templates). Point
|
|
82
|
+
* `auth.oauthCompleteProfilePath` at a page that asks these users for an
|
|
83
|
+
* email. `createUsers = false` still refuses them with `signup_disabled`.
|
|
84
|
+
*/
|
|
85
|
+
createUsersWithoutEmail?: boolean;
|
|
73
86
|
/**
|
|
74
87
|
* The provider's authorization URL. Put `ctx.state` on it unchanged — a
|
|
75
88
|
* callback whose `state` does not match is refused — and `ctx.codeChallenge`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OAuthProvider.d.ts","sourceRoot":"","sources":["../../../auth/oauth/OAuthProvider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAErD;;;;;;;GAOG;AACH,MAAM,WAAW,yBAAyB;IACxC,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,MAAM,CAAC;IACtB,mBAAmB,EAAE,MAAM,CAAC;CAC7B;AAED;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,YAAY;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;OAKG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;GAMG;AACH,qBAAa,kBAAmB,SAAQ,KAAK;IAC3C,IAAI,EAAE,MAAM,CAAC;gBACD,IAAI,EAAE,MAAM,EAAE,OAAO,SAAmC;CAKrE;AAED,8BAAsB,aAAa;IACjC;;;;;;;;;;;OAWG;IACH,WAAW,CAAC,EAAE,OAAO,CAAQ;IAE7B;;;;;;;;;;OAUG;IACH,WAAW,CAAC,EAAE,OAAO,CAAQ;IAE7B;;;;OAIG;IACH,QAAQ,CAAC,cAAc,CACrB,GAAG,EAAE,WAAW,EAChB,GAAG,CAAC,EAAE,yBAAyB,GAC9B,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAC3B;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,UAAU,CAAC,GAAG,EAAE,WAAW,EAAE,GAAG,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAAC,YAAY,CAAC;CACzF"}
|
|
1
|
+
{"version":3,"file":"OAuthProvider.d.ts","sourceRoot":"","sources":["../../../auth/oauth/OAuthProvider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,W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