@hichchi/ngx-auth 0.0.11 → 0.0.12

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.
@@ -304,7 +304,7 @@ class AuthService extends CrudHttpService {
304
304
  // eslint-disable-next-line @typescript-eslint/no-magic-numbers
305
305
  const top = (window.screen.height - GOOGLE_AUTH_POPUP_HEIGHT) / 2;
306
306
  const tenant = extractSubdomain(this.config.splitDomain) || this.config.tenant;
307
- const popup = window.open(`${this.config.apiBaseURL}/${Endpoint.AUTH}/${AuthEndpoint.GOOGLE_SIGN_IN}?redirectUrl=${window.location.origin}&tenant=${tenant}`, "google-login-popup",
307
+ const popup = window.open(`${this.config.apiBaseURL}/${Endpoint.AUTH}/${AuthEndpoint.GOOGLE_SIGN_IN}?redirectUrl=${window.location.origin}&tenant=${tenant || ""}`, "google-login-popup",
308
308
  // eslint-disable-next-line prefer-template
309
309
  "resizable=no, location=no, toolbar=false, width=" +
310
310
  GOOGLE_AUTH_POPUP_WIDTH +
@@ -1044,7 +1044,7 @@ const AuthState = signalStore({ providedIn: "root" }, withState(initialState), w
1044
1044
  const sub = authService.getAuthResponse(accessToken, !(showError || asPromise && showError === undefined)).pipe(tap((res) => {
1045
1045
  patchState(state, {
1046
1046
  ...res,
1047
- signedIn: Boolean(res.user.role)
1047
+ signedIn: Boolean(res.user)
1048
1048
  });
1049
1049
  if (redirect) {
1050
1050
  void router.navigateByUrl(typeof redirect === "string" ? redirect : redirect(res));