@geexcode/geex-angular 0.0.25 → 0.0.27

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/index.js CHANGED
@@ -176,12 +176,13 @@ function createAuthModule(injector) {
176
176
  async loadUserData() {
177
177
  const oAuthService = injector.get(import_angular_oauth2_oidc.OAuthService);
178
178
  try {
179
- if (!oAuthService.hasValidIdToken()) {
179
+ await oAuthService.loadDiscoveryDocumentAndTryLogin();
180
+ if (!oAuthService.hasValidAccessToken()) {
180
181
  return void 0;
181
182
  }
182
183
  await oAuthService.loadUserProfile();
183
184
  const profile = oAuthService.getIdentityClaims();
184
- if (profile && oAuthService.hasValidAccessToken()) {
185
+ if (profile) {
185
186
  const result = await (0, import_rxjs.firstValueFrom)(injector.get(import_apollo_angular.Apollo).mutate({
186
187
  mutation: GQL_FEDERATE_AUTH,
187
188
  variables: {
@@ -228,6 +229,9 @@ function createIdentityModule(injector) {
228
229
  }
229
230
  function createMessagingModule(injector) {
230
231
  return {
232
+ init: async () => {
233
+ return;
234
+ },
231
235
  onPublicNotify() {
232
236
  const subClient = injector.get(import_apollo_angular.Apollo).use("subscription");
233
237
  subClient.subscribe({ query: GQL_ON_PUBLIC_NOTIFY }).pipe((0, import_rxjs.map)((res) => res?.data?.onPublicNotify)).subscribe((notify) => {
package/dist/index.mjs CHANGED
@@ -131,12 +131,13 @@ function createAuthModule(injector) {
131
131
  async loadUserData() {
132
132
  const oAuthService = injector.get(OAuthService);
133
133
  try {
134
- if (!oAuthService.hasValidIdToken()) {
134
+ await oAuthService.loadDiscoveryDocumentAndTryLogin();
135
+ if (!oAuthService.hasValidAccessToken()) {
135
136
  return void 0;
136
137
  }
137
138
  await oAuthService.loadUserProfile();
138
139
  const profile = oAuthService.getIdentityClaims();
139
- if (profile && oAuthService.hasValidAccessToken()) {
140
+ if (profile) {
140
141
  const result = await firstValueFrom(injector.get(Apollo).mutate({
141
142
  mutation: GQL_FEDERATE_AUTH,
142
143
  variables: {
@@ -183,6 +184,9 @@ function createIdentityModule(injector) {
183
184
  }
184
185
  function createMessagingModule(injector) {
185
186
  return {
187
+ init: async () => {
188
+ return;
189
+ },
186
190
  onPublicNotify() {
187
191
  const subClient = injector.get(Apollo).use("subscription");
188
192
  subClient.subscribe({ query: GQL_ON_PUBLIC_NOTIFY }).pipe(map((res) => res?.data?.onPublicNotify)).subscribe((notify) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geexcode/geex-angular",
3
- "version": "0.0.25",
3
+ "version": "0.0.27",
4
4
  "description": "Angular adapter for Geex core.",
5
5
  "module": "dist/index.js",
6
6
  "main": "dist/index.cjs",