@indietabletop/appkit 3.0.1 → 3.1.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/client.d.ts +0 -11
- package/dist/client.js +0 -16
- package/package.json +1 -1
package/dist/client.d.ts
CHANGED
|
@@ -109,17 +109,6 @@ export declare class IndieTabletopClient {
|
|
|
109
109
|
message: string;
|
|
110
110
|
}>>;
|
|
111
111
|
getCurrentUser(): Promise<Failure<FailurePayload> | Success<{
|
|
112
|
-
sessionInfo: {
|
|
113
|
-
expiresTs: number;
|
|
114
|
-
createdTs: number;
|
|
115
|
-
};
|
|
116
|
-
currentUser: {
|
|
117
|
-
id: string;
|
|
118
|
-
email: string;
|
|
119
|
-
isVerified: boolean;
|
|
120
|
-
prefersScrollbarVisibility?: "ALWAYS" | undefined;
|
|
121
|
-
};
|
|
122
|
-
}> | Success<{
|
|
123
112
|
id: string;
|
|
124
113
|
email: string;
|
|
125
114
|
isVerified: boolean;
|
package/dist/client.js
CHANGED
|
@@ -196,22 +196,6 @@ export class IndieTabletopClient {
|
|
|
196
196
|
if (result.isSuccess) {
|
|
197
197
|
this.onCurrentUser?.(result.value);
|
|
198
198
|
}
|
|
199
|
-
// If /users/me request failed with 401 error, try again with the Ory
|
|
200
|
-
// endpoint for legacy users. This code block can be removed once Ory
|
|
201
|
-
// users are fully migrated.
|
|
202
|
-
if (result.isFailure &&
|
|
203
|
-
result.failure.type === "API_ERROR" &&
|
|
204
|
-
result.failure.code === 401) {
|
|
205
|
-
const oryR = await this.fetch(`/v1/users/ory`, object({
|
|
206
|
-
currentUser: currentUser(),
|
|
207
|
-
sessionInfo: sessionInfo(),
|
|
208
|
-
}));
|
|
209
|
-
if (oryR.isSuccess) {
|
|
210
|
-
this.onCurrentUser?.(oryR.value.currentUser);
|
|
211
|
-
this.onSessionInfo?.(oryR.value.sessionInfo);
|
|
212
|
-
}
|
|
213
|
-
return oryR;
|
|
214
|
-
}
|
|
215
199
|
return result;
|
|
216
200
|
}
|
|
217
201
|
}
|