ngx-better-auth 0.11.0 → 1.6.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/README.md +27 -2
- package/fesm2022/ngx-better-auth.mjs +48 -48
- package/fesm2022/ngx-better-auth.mjs.map +1 -1
- package/index.d.ts +12 -2151
- package/package.json +8 -2
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@ An **Angular 20+ wrapper for [Better Auth](https://github.com/better-auth/better
|
|
|
8
8
|

|
|
9
9
|
|
|
10
10
|

|
|
11
|
-

|
|
12
12
|
|
|
13
13
|
---
|
|
14
14
|
|
|
@@ -16,7 +16,8 @@ An **Angular 20+ wrapper for [Better Auth](https://github.com/better-auth/better
|
|
|
16
16
|
|
|
17
17
|
| ngx-better-auth | Angular | Better Auth |
|
|
18
18
|
|-----------------|---------|-------------|
|
|
19
|
-
| `
|
|
19
|
+
| `1.6.x` | `>=20` | `>=1.6.10 <1.7.0` |
|
|
20
|
+
| `0.11.x` | `>=20` | `>=1.3.7` |
|
|
20
21
|
|
|
21
22
|
---
|
|
22
23
|
|
|
@@ -26,6 +27,12 @@ An **Angular 20+ wrapper for [Better Auth](https://github.com/better-auth/better
|
|
|
26
27
|
npm install ngx-better-auth better-auth
|
|
27
28
|
```
|
|
28
29
|
|
|
30
|
+
If you use Passkey, install the split Better Auth Passkey package too:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
npm install @better-auth/passkey
|
|
34
|
+
```
|
|
35
|
+
|
|
29
36
|
---
|
|
30
37
|
|
|
31
38
|
## ⚙️ Setup Provider
|
|
@@ -37,6 +44,7 @@ import { ApplicationConfig } from '@angular/core'
|
|
|
37
44
|
import { provideBetterAuth } from 'ngx-better-auth'
|
|
38
45
|
import { environment } from './environments/environment'
|
|
39
46
|
import { adminClient, siweClient, twoFactorClient, usernameClient } from 'better-auth/client/plugins'
|
|
47
|
+
import { passkeyClient } from '@better-auth/passkey/client'
|
|
40
48
|
|
|
41
49
|
export const appConfig: ApplicationConfig = {
|
|
42
50
|
providers: [
|
|
@@ -60,6 +68,7 @@ export const appConfig: ApplicationConfig = {
|
|
|
60
68
|
user,
|
|
61
69
|
},
|
|
62
70
|
}),
|
|
71
|
+
passkeyClient(),
|
|
63
72
|
siweClient(),
|
|
64
73
|
],
|
|
65
74
|
})
|
|
@@ -69,6 +78,22 @@ export const appConfig: ApplicationConfig = {
|
|
|
69
78
|
|
|
70
79
|
## 🧩 Different services
|
|
71
80
|
|
|
81
|
+
### Migrating to 1.6.x
|
|
82
|
+
|
|
83
|
+
`ngx-better-auth 1.6.x` targets Better Auth `>=1.6.10 <1.7.0`.
|
|
84
|
+
|
|
85
|
+
If you use Passkey, install the split package and update imports:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
pnpm add @better-auth/passkey
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
```ts
|
|
92
|
+
import { passkeyClient } from '@better-auth/passkey/client'
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
SIWE users can keep using `SiweService.getNonce(...)`; internally it now maps to Better Auth's `siwe.getNonce` endpoint introduced in `1.6.10`.
|
|
96
|
+
|
|
72
97
|
You can inject different services depending on your needs.
|
|
73
98
|
**AuthService** provides the core Better Auth client methods (signIn, signOut, signUp, e.g.).
|
|
74
99
|
The full list of methods is available at the end of this README.
|
|
@@ -17,10 +17,10 @@ class MainService {
|
|
|
17
17
|
}
|
|
18
18
|
return data.data;
|
|
19
19
|
}
|
|
20
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
21
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.
|
|
20
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: MainService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
21
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: MainService, providedIn: 'root' });
|
|
22
22
|
}
|
|
23
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
23
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: MainService, decorators: [{
|
|
24
24
|
type: Injectable,
|
|
25
25
|
args: [{
|
|
26
26
|
providedIn: 'root',
|
|
@@ -81,7 +81,7 @@ class AuthService {
|
|
|
81
81
|
});
|
|
82
82
|
}
|
|
83
83
|
signInEmail(data) {
|
|
84
|
-
return defer(() => this.client.signIn.email(data)).pipe(switchMap(() => this.sessionState$.pipe(filter((s) => s !== null))));
|
|
84
|
+
return defer(() => this.client.signIn.email(data)).pipe(map((data) => this.mainService.mapData(data)), switchMap(() => this.sessionState$.pipe(filter((s) => s !== null))));
|
|
85
85
|
}
|
|
86
86
|
/**
|
|
87
87
|
* Sign up a new user using email and password.
|
|
@@ -90,16 +90,16 @@ class AuthService {
|
|
|
90
90
|
* @param data
|
|
91
91
|
*/
|
|
92
92
|
signUpEmail(data) {
|
|
93
|
-
return defer(() => this.client.signUp.email(data)).pipe(switchMap(() => this.sessionState$.pipe(filter((s) => s !== null))));
|
|
93
|
+
return defer(() => this.client.signUp.email(data)).pipe(map((data) => this.mainService.mapData(data)), switchMap(() => this.sessionState$.pipe(filter((s) => s !== null))));
|
|
94
94
|
}
|
|
95
95
|
signInProvider(data) {
|
|
96
96
|
return defer(() => this.client.signIn.social({
|
|
97
97
|
callbackURL: window.location.origin,
|
|
98
98
|
...data,
|
|
99
|
-
})).pipe(switchMap(() => this.sessionState$.pipe(filter((s) => s !== null))));
|
|
99
|
+
})).pipe(map((data) => this.mainService.mapData(data)), switchMap(() => this.sessionState$.pipe(filter((s) => s !== null))));
|
|
100
100
|
}
|
|
101
101
|
signOut() {
|
|
102
|
-
return defer(() => this.client.signOut()).pipe(switchMap(() => this.sessionState$.pipe(filter((s) => s === null))));
|
|
102
|
+
return defer(() => this.client.signOut()).pipe(map((data) => this.mainService.mapData(data)), switchMap(() => this.sessionState$.pipe(filter((s) => s === null))));
|
|
103
103
|
}
|
|
104
104
|
sendVerificationEmail(data) {
|
|
105
105
|
return defer(() => this.client.sendVerificationEmail(data)).pipe(map((data) => this.mainService.mapData(data)));
|
|
@@ -120,12 +120,12 @@ class AuthService {
|
|
|
120
120
|
return defer(() => this.client.updateUser(data)).pipe(map((data) => this.mainService.mapData(data)));
|
|
121
121
|
}
|
|
122
122
|
deleteUser(data) {
|
|
123
|
-
return defer(() => this.client.deleteUser(data)).pipe(switchMap(() => this.sessionState$.pipe(filter((s) => s === null))), first());
|
|
123
|
+
return defer(() => this.client.deleteUser(data)).pipe(map((data) => this.mainService.mapData(data)), switchMap(() => this.sessionState$.pipe(filter((s) => s === null))), first());
|
|
124
124
|
}
|
|
125
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
126
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.
|
|
125
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: AuthService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
126
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: AuthService, providedIn: 'root' });
|
|
127
127
|
}
|
|
128
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
128
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: AuthService, decorators: [{
|
|
129
129
|
type: Injectable,
|
|
130
130
|
args: [{
|
|
131
131
|
providedIn: 'root',
|
|
@@ -147,10 +147,10 @@ class SessionService {
|
|
|
147
147
|
revokeAllSessions() {
|
|
148
148
|
return defer(() => this.client.revokeSessions()).pipe(map((data) => this.mainService.mapData(data)));
|
|
149
149
|
}
|
|
150
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
151
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.
|
|
150
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SessionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
151
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SessionService, providedIn: 'root' });
|
|
152
152
|
}
|
|
153
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
153
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SessionService, decorators: [{
|
|
154
154
|
type: Injectable,
|
|
155
155
|
args: [{ providedIn: 'root' }]
|
|
156
156
|
}] });
|
|
@@ -167,10 +167,10 @@ class AccountService {
|
|
|
167
167
|
unlinkAccount(data) {
|
|
168
168
|
return defer(() => this.client.unlinkAccount(data)).pipe(map((data) => this.mainService.mapData(data)));
|
|
169
169
|
}
|
|
170
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
171
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.
|
|
170
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: AccountService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
171
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: AccountService, providedIn: 'root' });
|
|
172
172
|
}
|
|
173
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
173
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: AccountService, decorators: [{
|
|
174
174
|
type: Injectable,
|
|
175
175
|
args: [{ providedIn: 'root' }]
|
|
176
176
|
}] });
|
|
@@ -217,10 +217,10 @@ class TwoFactorService {
|
|
|
217
217
|
verifyBackupCode(data) {
|
|
218
218
|
return defer(() => this.twoFactor.verifyBackupCode(data)).pipe(map((data) => this.mainService.mapData(data)));
|
|
219
219
|
}
|
|
220
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
221
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.
|
|
220
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: TwoFactorService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
221
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: TwoFactorService, providedIn: 'root' });
|
|
222
222
|
}
|
|
223
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
223
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: TwoFactorService, decorators: [{
|
|
224
224
|
type: Injectable,
|
|
225
225
|
args: [{ providedIn: 'root' }]
|
|
226
226
|
}], ctorParameters: () => [] });
|
|
@@ -248,10 +248,10 @@ class PasskeyService {
|
|
|
248
248
|
updatePasskey(data) {
|
|
249
249
|
return defer(() => this.passkey.updatePasskey(data)).pipe(map((data) => this.mainService.mapData(data)));
|
|
250
250
|
}
|
|
251
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
252
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.
|
|
251
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: PasskeyService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
252
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: PasskeyService, providedIn: 'root' });
|
|
253
253
|
}
|
|
254
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
254
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: PasskeyService, decorators: [{
|
|
255
255
|
type: Injectable,
|
|
256
256
|
args: [{ providedIn: 'root' }]
|
|
257
257
|
}], ctorParameters: () => [] });
|
|
@@ -271,10 +271,10 @@ class GenericOauthService {
|
|
|
271
271
|
link(data) {
|
|
272
272
|
return defer(() => this.oauth.link(data));
|
|
273
273
|
}
|
|
274
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
275
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.
|
|
274
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: GenericOauthService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
275
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: GenericOauthService, providedIn: 'root' });
|
|
276
276
|
}
|
|
277
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
277
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: GenericOauthService, decorators: [{
|
|
278
278
|
type: Injectable,
|
|
279
279
|
args: [{ providedIn: 'root' }]
|
|
280
280
|
}], ctorParameters: () => [] });
|
|
@@ -303,10 +303,10 @@ class EmailOtpService {
|
|
|
303
303
|
resetPassword(data) {
|
|
304
304
|
return defer(() => this.emailOtp.resetPassword(data));
|
|
305
305
|
}
|
|
306
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
307
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.
|
|
306
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: EmailOtpService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
307
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: EmailOtpService, providedIn: 'root' });
|
|
308
308
|
}
|
|
309
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
309
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: EmailOtpService, decorators: [{
|
|
310
310
|
type: Injectable,
|
|
311
311
|
args: [{ providedIn: 'root' }]
|
|
312
312
|
}], ctorParameters: () => [] });
|
|
@@ -322,10 +322,10 @@ class OneTapService {
|
|
|
322
322
|
signIn(data) {
|
|
323
323
|
return defer(() => this.oneTap(data));
|
|
324
324
|
}
|
|
325
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
326
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.
|
|
325
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: OneTapService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
326
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: OneTapService, providedIn: 'root' });
|
|
327
327
|
}
|
|
328
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
328
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: OneTapService, decorators: [{
|
|
329
329
|
type: Injectable,
|
|
330
330
|
args: [{ providedIn: 'root' }]
|
|
331
331
|
}], ctorParameters: () => [] });
|
|
@@ -344,10 +344,10 @@ class MagicLinkService {
|
|
|
344
344
|
verify(data) {
|
|
345
345
|
return defer(() => this.magicLink.verify(data));
|
|
346
346
|
}
|
|
347
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
348
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.
|
|
347
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: MagicLinkService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
348
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: MagicLinkService, providedIn: 'root' });
|
|
349
349
|
}
|
|
350
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
350
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: MagicLinkService, decorators: [{
|
|
351
351
|
type: Injectable,
|
|
352
352
|
args: [{ providedIn: 'root' }]
|
|
353
353
|
}], ctorParameters: () => [] });
|
|
@@ -382,10 +382,10 @@ class UsernameService {
|
|
|
382
382
|
.post(`${this.mainService.url}/is-username-available`, data)
|
|
383
383
|
.pipe(map((res) => res.available));
|
|
384
384
|
}
|
|
385
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
386
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.
|
|
385
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: UsernameService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
386
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: UsernameService, providedIn: 'root' });
|
|
387
387
|
}
|
|
388
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
388
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: UsernameService, decorators: [{
|
|
389
389
|
type: Injectable,
|
|
390
390
|
args: [{ providedIn: 'root' }]
|
|
391
391
|
}] });
|
|
@@ -443,10 +443,10 @@ class AdminService {
|
|
|
443
443
|
checkRolePermission(data) {
|
|
444
444
|
return defer(() => this.admin.checkRolePermission(data));
|
|
445
445
|
}
|
|
446
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
447
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.
|
|
446
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: AdminService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
447
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: AdminService, providedIn: 'root' });
|
|
448
448
|
}
|
|
449
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
449
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: AdminService, decorators: [{
|
|
450
450
|
type: Injectable,
|
|
451
451
|
args: [{ providedIn: 'root' }]
|
|
452
452
|
}], ctorParameters: () => [] });
|
|
@@ -543,10 +543,10 @@ class OrganizationService {
|
|
|
543
543
|
removeTeamMember(data) {
|
|
544
544
|
return defer(() => this.organization.removeTeamMember(data));
|
|
545
545
|
}
|
|
546
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
547
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.
|
|
546
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: OrganizationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
547
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: OrganizationService, providedIn: 'root' });
|
|
548
548
|
}
|
|
549
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
549
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: OrganizationService, decorators: [{
|
|
550
550
|
type: Injectable,
|
|
551
551
|
args: [{ providedIn: 'root' }]
|
|
552
552
|
}], ctorParameters: () => [] });
|
|
@@ -565,7 +565,7 @@ class SiweService {
|
|
|
565
565
|
* @param data - The wallet address and optional chain ID
|
|
566
566
|
*/
|
|
567
567
|
getNonce(data) {
|
|
568
|
-
return defer(() => this.siwe.
|
|
568
|
+
return defer(() => this.siwe.getNonce(data)).pipe(map((res) => this.mainService.mapData(res)));
|
|
569
569
|
}
|
|
570
570
|
/**
|
|
571
571
|
* Verifies a signed SIWE message and signs the user in.
|
|
@@ -575,10 +575,10 @@ class SiweService {
|
|
|
575
575
|
verifyMessage(data) {
|
|
576
576
|
return defer(() => this.siwe.verifySiweMessage(data)).pipe(map((res) => this.mainService.mapData(res)), switchMap((result) => this.authService.sessionState$.pipe(filter((s) => s !== null), map(() => result))));
|
|
577
577
|
}
|
|
578
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
579
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.
|
|
578
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SiweService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
579
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SiweService, providedIn: 'root' });
|
|
580
580
|
}
|
|
581
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
581
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SiweService, decorators: [{
|
|
582
582
|
type: Injectable,
|
|
583
583
|
args: [{ providedIn: 'root' }]
|
|
584
584
|
}], ctorParameters: () => [] });
|