@savant-realms/federated-auth-realm-sdk-ts-js 0.4.1 → 0.4.3
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 +7 -1
- package/dist/client.js +6 -0
- package/dist/types/index.d.ts +18 -4
- package/package.json +1 -1
package/dist/client.d.ts
CHANGED
|
@@ -39,7 +39,13 @@ export declare class FederatedAuthClient {
|
|
|
39
39
|
message: string;
|
|
40
40
|
}>;
|
|
41
41
|
verifyToken(token: string): Promise<VerifyTokenResponse>;
|
|
42
|
-
|
|
42
|
+
setSession(auth: {
|
|
43
|
+
accessToken?: string;
|
|
44
|
+
refreshToken?: string;
|
|
45
|
+
user?: User;
|
|
46
|
+
}): Promise<void>;
|
|
47
|
+
getAccessToken(): Promise<string | null>;
|
|
48
|
+
getRefreshToken(): Promise<string | null>;
|
|
43
49
|
getUser(): Promise<User | null>;
|
|
44
50
|
isAuthenticated(): Promise<boolean>;
|
|
45
51
|
}
|
package/dist/client.js
CHANGED
|
@@ -169,6 +169,12 @@ class FederatedAuthClient {
|
|
|
169
169
|
await this.storage.setItem('user', JSON.stringify(auth.user));
|
|
170
170
|
}
|
|
171
171
|
}
|
|
172
|
+
async getAccessToken() {
|
|
173
|
+
return this.storage.getItem('accessToken');
|
|
174
|
+
}
|
|
175
|
+
async getRefreshToken() {
|
|
176
|
+
return this.storage.getItem('refreshToken');
|
|
177
|
+
}
|
|
172
178
|
async getUser() {
|
|
173
179
|
const userStr = await this.storage.getItem('user');
|
|
174
180
|
if (userStr) {
|
package/dist/types/index.d.ts
CHANGED
|
@@ -176,10 +176,24 @@ export interface Application {
|
|
|
176
176
|
name: string;
|
|
177
177
|
logo?: string;
|
|
178
178
|
description?: string;
|
|
179
|
+
category?: string;
|
|
179
180
|
status?: ApplicationStatus;
|
|
180
181
|
managerId?: string;
|
|
182
|
+
managerName?: string;
|
|
183
|
+
managerSurname?: string;
|
|
184
|
+
contactEmail?: string;
|
|
185
|
+
contactPhone?: string;
|
|
181
186
|
isPublic?: boolean;
|
|
182
187
|
platforms?: Platform[];
|
|
188
|
+
allowRegistration?: boolean;
|
|
189
|
+
requireEmailVerification?: boolean;
|
|
190
|
+
requireApproval?: boolean;
|
|
191
|
+
autoGrantAccess?: boolean;
|
|
192
|
+
maxUsers?: number;
|
|
193
|
+
allowGuestUsers?: boolean;
|
|
194
|
+
registrationRequiredFields?: string[];
|
|
195
|
+
otherOptionalFields?: string[];
|
|
196
|
+
pendingAccessRequests?: any[];
|
|
183
197
|
config?: Record<string, unknown>;
|
|
184
198
|
createdAt?: string;
|
|
185
199
|
updatedAt?: string;
|
|
@@ -196,7 +210,7 @@ export interface LoginRequest {
|
|
|
196
210
|
email?: string;
|
|
197
211
|
id?: string;
|
|
198
212
|
password?: string;
|
|
199
|
-
appKey
|
|
213
|
+
appKey?: string;
|
|
200
214
|
rememberMe?: boolean;
|
|
201
215
|
}
|
|
202
216
|
export interface RegisterRequest {
|
|
@@ -204,7 +218,7 @@ export interface RegisterRequest {
|
|
|
204
218
|
password?: string;
|
|
205
219
|
name?: string;
|
|
206
220
|
surname?: string;
|
|
207
|
-
appKey
|
|
221
|
+
appKey?: string;
|
|
208
222
|
gender?: Gender;
|
|
209
223
|
dateOfBirth?: string;
|
|
210
224
|
phoneNumbers?: PhoneNumber[];
|
|
@@ -218,11 +232,11 @@ export interface RegisterRequest {
|
|
|
218
232
|
}
|
|
219
233
|
export interface GoogleAuthRequest {
|
|
220
234
|
googleToken: string;
|
|
221
|
-
appKey
|
|
235
|
+
appKey?: string;
|
|
222
236
|
}
|
|
223
237
|
export interface FacebookAuthRequest {
|
|
224
238
|
facebookToken: string;
|
|
225
|
-
appKey
|
|
239
|
+
appKey?: string;
|
|
226
240
|
}
|
|
227
241
|
export interface ForgotPasswordRequest {
|
|
228
242
|
email: string;
|