@dflat-core/web 1.7.2088 → 1.7.2089

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.
@@ -711,12 +711,14 @@ var AuthService = class AuthService {
711
711
  getLoginProviders() {
712
712
  return this.httpClient.get(this.baseUrl + ServerUrl.loginProvidersPath, { headers: this.headersService.jsonHeaders() });
713
713
  }
714
- loginExternal(provider, idToken, rememberMe, firstName, lastName) {
714
+ loginExternal(provider, idToken, rememberMe, firstName, lastName, authorizationCode, redirectUri) {
715
715
  let body = JSON.stringify({
716
716
  "Provider": provider,
717
717
  "IdToken": idToken,
718
718
  "FirstName": firstName,
719
- "LastName": lastName
719
+ "LastName": lastName,
720
+ "AuthorizationCode": authorizationCode,
721
+ "RedirectUri": redirectUri
720
722
  });
721
723
  let _url = this.baseUrl + ServerUrl.connectExternalPath;
722
724
  return this.httpClient.post(_url, body, { headers: this.headersService.authJsonHeaders() }).pipe(map((resp) => {
@@ -915,10 +917,10 @@ var AuthService = class AuthService {
915
917
  return parsed.IsAdmin || false;
916
918
  }
917
919
  get pseudo() {
918
- return JSON.parse(this.currentUser).Username || "";
920
+ return JSON.parse(this.currentUser)?.Username || "";
919
921
  }
920
922
  get userId() {
921
- return JSON.parse(this.currentUser).Id || 0;
923
+ return JSON.parse(this.currentUser)?.Id || 0;
922
924
  }
923
925
  get currentUser() {
924
926
  return this.localStorage.getDataObject(AppKeys.CURRENT_USER);
@@ -1137,7 +1139,9 @@ var ExternalLoginService = class ExternalLoginService {
1137
1139
  provider: ExternalLoginService.apple,
1138
1140
  idToken,
1139
1141
  firstName: name.firstName,
1140
- lastName: name.lastName
1142
+ lastName: name.lastName,
1143
+ authorizationCode: response.authorization.code,
1144
+ redirectUri: this.redirectUri
1141
1145
  };
1142
1146
  });
1143
1147
  }