capacitor-auth-manager 0.0.1 → 1.0.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/CapacitorAuthManager.podspec +36 -0
- package/LICENSE +1 -1
- package/Readme.md +577 -20
- package/android/build.gradle +79 -0
- package/android/gradle.properties +25 -0
- package/android/proguard-rules.pro +38 -0
- package/android/settings.gradle +2 -0
- package/android/src/main/AndroidManifest.xml +11 -0
- package/android/src/main/java/com/aoneahsan/capacitor_auth_manager/AuthLogger.java +117 -0
- package/android/src/main/java/com/aoneahsan/capacitor_auth_manager/AuthStorage.java +124 -0
- package/android/src/main/java/com/aoneahsan/capacitor_auth_manager/BaseAuthProvider.java +16 -0
- package/android/src/main/java/com/aoneahsan/capacitor_auth_manager/CapacitorAuthManager.java +385 -0
- package/android/src/main/java/com/aoneahsan/capacitor_auth_manager/CapacitorAuthManagerPlugin.java +469 -0
- package/dist/esm/definitions.d.ts +521 -0
- package/dist/esm/definitions.js +103 -1
- package/dist/esm/definitions.js.map +1 -1
- package/dist/esm/index.d.ts +4 -0
- package/dist/esm/index.js +6 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/providers/base-provider.d.ts +43 -0
- package/dist/esm/providers/base-provider.js +112 -0
- package/dist/esm/providers/base-provider.js.map +1 -0
- package/dist/esm/providers/oauth-provider.d.ts +30 -0
- package/dist/esm/providers/oauth-provider.js +255 -0
- package/dist/esm/providers/oauth-provider.js.map +1 -0
- package/dist/esm/providers/provider-factory.d.ts +7 -0
- package/dist/esm/providers/provider-factory.js +76 -0
- package/dist/esm/providers/provider-factory.js.map +1 -0
- package/dist/esm/providers/web/apple-provider.d.ts +33 -0
- package/dist/esm/providers/web/apple-provider.js +270 -0
- package/dist/esm/providers/web/apple-provider.js.map +1 -0
- package/dist/esm/providers/web/google-provider.d.ts +27 -0
- package/dist/esm/providers/web/google-provider.js +258 -0
- package/dist/esm/providers/web/google-provider.js.map +1 -0
- package/dist/esm/utils/auth-error.d.ts +16 -0
- package/dist/esm/utils/auth-error.js +53 -0
- package/dist/esm/utils/auth-error.js.map +1 -0
- package/dist/esm/utils/event-emitter.d.ts +9 -0
- package/dist/esm/utils/event-emitter.js +28 -0
- package/dist/esm/utils/event-emitter.js.map +1 -0
- package/dist/esm/utils/logger.d.ts +19 -0
- package/dist/esm/utils/logger.js +48 -0
- package/dist/esm/utils/logger.js.map +1 -0
- package/dist/esm/utils/storage.d.ts +16 -0
- package/dist/esm/utils/storage.js +86 -0
- package/dist/esm/utils/storage.js.map +1 -0
- package/dist/esm/web.d.ts +43 -0
- package/dist/esm/web.js +374 -1
- package/dist/esm/web.js.map +1 -1
- package/dist/plugin.cjs.js +1650 -0
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +1652 -3
- package/dist/plugin.js.map +1 -1
- package/ios/Plugin/AuthLogger.swift +71 -0
- package/ios/Plugin/AuthStorage.swift +139 -0
- package/ios/Plugin/BaseAuthProvider.swift +33 -0
- package/ios/Plugin/CapacitorAuthManager.swift +406 -0
- package/ios/Plugin/Models.swift +376 -0
- package/ios/Plugin/Plugin.m +27 -0
- package/ios/Plugin/Plugin.swift +413 -0
- package/package.json +6 -2
- package/scripts/configure.js +295 -0
|
@@ -0,0 +1,413 @@
|
|
|
1
|
+
import Foundation
|
|
2
|
+
import Capacitor
|
|
3
|
+
|
|
4
|
+
@objc(CapacitorAuthManagerPlugin)
|
|
5
|
+
public class CapacitorAuthManagerPlugin: CAPPlugin {
|
|
6
|
+
private let implementation = CapacitorAuthManager()
|
|
7
|
+
|
|
8
|
+
@objc func initialize(_ call: CAPPluginCall) {
|
|
9
|
+
do {
|
|
10
|
+
guard let providers = call.getArray("providers", JSObject.self) else {
|
|
11
|
+
throw AuthManagerError.missingConfiguration("providers")
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
let options = AuthManagerInitOptions(
|
|
15
|
+
providers: try providers.map { try AuthProviderConfig(from: $0) },
|
|
16
|
+
persistence: AuthPersistence(rawValue: call.getString("persistence") ?? "local") ?? .local,
|
|
17
|
+
autoRefreshToken: call.getBool("autoRefreshToken") ?? true,
|
|
18
|
+
tokenRefreshBuffer: call.getInt("tokenRefreshBuffer") ?? 300000,
|
|
19
|
+
enableLogging: call.getBool("enableLogging") ?? false,
|
|
20
|
+
logLevel: call.getString("logLevel") ?? "info"
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
implementation.initialize(options: options) { [weak self] error in
|
|
24
|
+
if let error = error {
|
|
25
|
+
call.reject(error.localizedDescription)
|
|
26
|
+
} else {
|
|
27
|
+
call.resolve()
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
} catch {
|
|
31
|
+
call.reject(error.localizedDescription)
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@objc func signIn(_ call: CAPPluginCall) {
|
|
36
|
+
do {
|
|
37
|
+
guard let providerString = call.getString("provider"),
|
|
38
|
+
let provider = AuthProvider(rawValue: providerString) else {
|
|
39
|
+
throw AuthManagerError.invalidProvider
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
let options = SignInOptions(
|
|
43
|
+
provider: provider,
|
|
44
|
+
credentials: call.getObject("credentials"),
|
|
45
|
+
options: call.getObject("options")
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
implementation.signIn(options: options) { [weak self] result, error in
|
|
49
|
+
if let error = error {
|
|
50
|
+
call.reject(error.localizedDescription)
|
|
51
|
+
} else if let result = result {
|
|
52
|
+
call.resolve(result.toJSObject())
|
|
53
|
+
} else {
|
|
54
|
+
call.reject("Unknown error occurred")
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
} catch {
|
|
58
|
+
call.reject(error.localizedDescription)
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
@objc func signOut(_ call: CAPPluginCall) {
|
|
63
|
+
let options = SignOutOptions(
|
|
64
|
+
provider: AuthProvider(rawValue: call.getString("provider") ?? ""),
|
|
65
|
+
revokeToken: call.getBool("revokeToken") ?? false,
|
|
66
|
+
clearCache: call.getBool("clearCache") ?? true,
|
|
67
|
+
redirectUrl: call.getString("redirectUrl")
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
implementation.signOut(options: options) { [weak self] error in
|
|
71
|
+
if let error = error {
|
|
72
|
+
call.reject(error.localizedDescription)
|
|
73
|
+
} else {
|
|
74
|
+
call.resolve()
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
@objc func getCurrentUser(_ call: CAPPluginCall) {
|
|
80
|
+
implementation.getCurrentUser { [weak self] user, error in
|
|
81
|
+
if let error = error {
|
|
82
|
+
call.reject(error.localizedDescription)
|
|
83
|
+
} else if let user = user {
|
|
84
|
+
call.resolve(user.toJSObject())
|
|
85
|
+
} else {
|
|
86
|
+
call.resolve([:])
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
@objc func refreshToken(_ call: CAPPluginCall) {
|
|
92
|
+
let options = RefreshTokenOptions(
|
|
93
|
+
provider: AuthProvider(rawValue: call.getString("provider") ?? ""),
|
|
94
|
+
forceRefresh: call.getBool("forceRefresh") ?? false
|
|
95
|
+
)
|
|
96
|
+
|
|
97
|
+
implementation.refreshToken(options: options) { [weak self] result, error in
|
|
98
|
+
if let error = error {
|
|
99
|
+
call.reject(error.localizedDescription)
|
|
100
|
+
} else if let result = result {
|
|
101
|
+
call.resolve(result.toJSObject())
|
|
102
|
+
} else {
|
|
103
|
+
call.reject("Unknown error occurred")
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
@objc func addAuthStateListener(_ call: CAPPluginCall) {
|
|
109
|
+
let callbackId = implementation.addAuthStateListener { [weak self] user in
|
|
110
|
+
self?.notifyListeners("authStateChange", data: user?.toJSObject() ?? [:])
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
call.resolve([
|
|
114
|
+
"callbackId": callbackId
|
|
115
|
+
])
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
@objc func removeAllListeners(_ call: CAPPluginCall) {
|
|
119
|
+
implementation.removeAllListeners()
|
|
120
|
+
call.resolve()
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
@objc func isSupported(_ call: CAPPluginCall) {
|
|
124
|
+
guard let providerString = call.getString("provider"),
|
|
125
|
+
let provider = AuthProvider(rawValue: providerString) else {
|
|
126
|
+
call.reject("Invalid provider")
|
|
127
|
+
return
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
implementation.isSupported(provider: provider) { [weak self] result, error in
|
|
131
|
+
if let error = error {
|
|
132
|
+
call.reject(error.localizedDescription)
|
|
133
|
+
} else if let result = result {
|
|
134
|
+
call.resolve(result.toJSObject())
|
|
135
|
+
} else {
|
|
136
|
+
call.reject("Unknown error occurred")
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
@objc func configure(_ call: CAPPluginCall) {
|
|
142
|
+
do {
|
|
143
|
+
guard let providerString = call.getString("provider"),
|
|
144
|
+
let provider = AuthProvider(rawValue: providerString),
|
|
145
|
+
let options = call.getObject("options") else {
|
|
146
|
+
throw AuthManagerError.missingConfiguration("provider or options")
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
let config = try AuthProviderConfig(provider: provider, options: options)
|
|
150
|
+
|
|
151
|
+
implementation.configure(config: config) { [weak self] error in
|
|
152
|
+
if let error = error {
|
|
153
|
+
call.reject(error.localizedDescription)
|
|
154
|
+
} else {
|
|
155
|
+
call.resolve()
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
} catch {
|
|
159
|
+
call.reject(error.localizedDescription)
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
@objc func linkAccount(_ call: CAPPluginCall) {
|
|
164
|
+
do {
|
|
165
|
+
guard let providerString = call.getString("provider"),
|
|
166
|
+
let provider = AuthProvider(rawValue: providerString) else {
|
|
167
|
+
throw AuthManagerError.invalidProvider
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
let options = LinkAccountOptions(
|
|
171
|
+
provider: provider,
|
|
172
|
+
credentials: call.getObject("credentials"),
|
|
173
|
+
options: call.getObject("options")
|
|
174
|
+
)
|
|
175
|
+
|
|
176
|
+
implementation.linkAccount(options: options) { [weak self] result, error in
|
|
177
|
+
if let error = error {
|
|
178
|
+
call.reject(error.localizedDescription)
|
|
179
|
+
} else if let result = result {
|
|
180
|
+
call.resolve(result.toJSObject())
|
|
181
|
+
} else {
|
|
182
|
+
call.reject("Unknown error occurred")
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
} catch {
|
|
186
|
+
call.reject(error.localizedDescription)
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
@objc func unlinkAccount(_ call: CAPPluginCall) {
|
|
191
|
+
guard let providerString = call.getString("provider"),
|
|
192
|
+
let provider = AuthProvider(rawValue: providerString) else {
|
|
193
|
+
call.reject("Invalid provider")
|
|
194
|
+
return
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
implementation.unlinkAccount(provider: provider) { [weak self] error in
|
|
198
|
+
if let error = error {
|
|
199
|
+
call.reject(error.localizedDescription)
|
|
200
|
+
} else {
|
|
201
|
+
call.resolve()
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
@objc func sendPasswordResetEmail(_ call: CAPPluginCall) {
|
|
207
|
+
guard let email = call.getString("email") else {
|
|
208
|
+
call.reject("Email is required")
|
|
209
|
+
return
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
let options = PasswordResetOptions(
|
|
213
|
+
email: email,
|
|
214
|
+
actionCodeSettings: call.getObject("actionCodeSettings")
|
|
215
|
+
)
|
|
216
|
+
|
|
217
|
+
implementation.sendPasswordResetEmail(options: options) { [weak self] error in
|
|
218
|
+
if let error = error {
|
|
219
|
+
call.reject(error.localizedDescription)
|
|
220
|
+
} else {
|
|
221
|
+
call.resolve()
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
@objc func sendEmailVerification(_ call: CAPPluginCall) {
|
|
227
|
+
let options = EmailVerificationOptions(
|
|
228
|
+
actionCodeSettings: call.getObject("actionCodeSettings")
|
|
229
|
+
)
|
|
230
|
+
|
|
231
|
+
implementation.sendEmailVerification(options: options) { [weak self] error in
|
|
232
|
+
if let error = error {
|
|
233
|
+
call.reject(error.localizedDescription)
|
|
234
|
+
} else {
|
|
235
|
+
call.resolve()
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
@objc func sendSmsCode(_ call: CAPPluginCall) {
|
|
241
|
+
guard let phoneNumber = call.getString("phoneNumber") else {
|
|
242
|
+
call.reject("Phone number is required")
|
|
243
|
+
return
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
let options = SendSmsCodeOptions(
|
|
247
|
+
phoneNumber: phoneNumber,
|
|
248
|
+
recaptchaToken: call.getString("recaptchaToken"),
|
|
249
|
+
testCode: call.getString("testCode")
|
|
250
|
+
)
|
|
251
|
+
|
|
252
|
+
implementation.sendSmsCode(options: options) { [weak self] error in
|
|
253
|
+
if let error = error {
|
|
254
|
+
call.reject(error.localizedDescription)
|
|
255
|
+
} else {
|
|
256
|
+
call.resolve()
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
@objc func verifySmsCode(_ call: CAPPluginCall) {
|
|
262
|
+
guard let phoneNumber = call.getString("phoneNumber"),
|
|
263
|
+
let code = call.getString("code") else {
|
|
264
|
+
call.reject("Phone number and code are required")
|
|
265
|
+
return
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
let options = VerifySmsCodeOptions(
|
|
269
|
+
phoneNumber: phoneNumber,
|
|
270
|
+
code: code,
|
|
271
|
+
verificationId: call.getString("verificationId")
|
|
272
|
+
)
|
|
273
|
+
|
|
274
|
+
implementation.verifySmsCode(options: options) { [weak self] result, error in
|
|
275
|
+
if let error = error {
|
|
276
|
+
call.reject(error.localizedDescription)
|
|
277
|
+
} else if let result = result {
|
|
278
|
+
call.resolve(result.toJSObject())
|
|
279
|
+
} else {
|
|
280
|
+
call.reject("Unknown error occurred")
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
@objc func sendEmailCode(_ call: CAPPluginCall) {
|
|
286
|
+
guard let email = call.getString("email") else {
|
|
287
|
+
call.reject("Email is required")
|
|
288
|
+
return
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
let options = SendEmailCodeOptions(
|
|
292
|
+
email: email,
|
|
293
|
+
recaptchaToken: call.getString("recaptchaToken"),
|
|
294
|
+
testCode: call.getString("testCode")
|
|
295
|
+
)
|
|
296
|
+
|
|
297
|
+
implementation.sendEmailCode(options: options) { [weak self] error in
|
|
298
|
+
if let error = error {
|
|
299
|
+
call.reject(error.localizedDescription)
|
|
300
|
+
} else {
|
|
301
|
+
call.resolve()
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
@objc func verifyEmailCode(_ call: CAPPluginCall) {
|
|
307
|
+
guard let email = call.getString("email"),
|
|
308
|
+
let code = call.getString("code") else {
|
|
309
|
+
call.reject("Email and code are required")
|
|
310
|
+
return
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
let options = VerifyEmailCodeOptions(
|
|
314
|
+
email: email,
|
|
315
|
+
code: code,
|
|
316
|
+
verificationId: call.getString("verificationId")
|
|
317
|
+
)
|
|
318
|
+
|
|
319
|
+
implementation.verifyEmailCode(options: options) { [weak self] result, error in
|
|
320
|
+
if let error = error {
|
|
321
|
+
call.reject(error.localizedDescription)
|
|
322
|
+
} else if let result = result {
|
|
323
|
+
call.resolve(result.toJSObject())
|
|
324
|
+
} else {
|
|
325
|
+
call.reject("Unknown error occurred")
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
@objc func updateProfile(_ call: CAPPluginCall) {
|
|
331
|
+
let options = UpdateProfileOptions(
|
|
332
|
+
displayName: call.getString("displayName"),
|
|
333
|
+
photoURL: call.getString("photoURL"),
|
|
334
|
+
phoneNumber: call.getString("phoneNumber"),
|
|
335
|
+
customClaims: call.getObject("customClaims")
|
|
336
|
+
)
|
|
337
|
+
|
|
338
|
+
implementation.updateProfile(options: options) { [weak self] user, error in
|
|
339
|
+
if let error = error {
|
|
340
|
+
call.reject(error.localizedDescription)
|
|
341
|
+
} else if let user = user {
|
|
342
|
+
call.resolve(user.toJSObject())
|
|
343
|
+
} else {
|
|
344
|
+
call.reject("Unknown error occurred")
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
@objc func deleteAccount(_ call: CAPPluginCall) {
|
|
350
|
+
let options = DeleteAccountOptions(
|
|
351
|
+
requireReauthentication: call.getBool("requireReauthentication") ?? false,
|
|
352
|
+
provider: AuthProvider(rawValue: call.getString("provider") ?? ""),
|
|
353
|
+
credentials: call.getObject("credentials")
|
|
354
|
+
)
|
|
355
|
+
|
|
356
|
+
implementation.deleteAccount(options: options) { [weak self] error in
|
|
357
|
+
if let error = error {
|
|
358
|
+
call.reject(error.localizedDescription)
|
|
359
|
+
} else {
|
|
360
|
+
call.resolve()
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
@objc func getIdToken(_ call: CAPPluginCall) {
|
|
366
|
+
let options = GetIdTokenOptions(
|
|
367
|
+
forceRefresh: call.getBool("forceRefresh") ?? false,
|
|
368
|
+
provider: AuthProvider(rawValue: call.getString("provider") ?? "")
|
|
369
|
+
)
|
|
370
|
+
|
|
371
|
+
implementation.getIdToken(options: options) { [weak self] token, error in
|
|
372
|
+
if let error = error {
|
|
373
|
+
call.reject(error.localizedDescription)
|
|
374
|
+
} else if let token = token {
|
|
375
|
+
call.resolve(["token": token])
|
|
376
|
+
} else {
|
|
377
|
+
call.reject("Failed to get ID token")
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
@objc func setCustomParameters(_ call: CAPPluginCall) {
|
|
383
|
+
guard let providerString = call.getString("provider"),
|
|
384
|
+
let provider = AuthProvider(rawValue: providerString),
|
|
385
|
+
let parameters = call.getObject("parameters") else {
|
|
386
|
+
call.reject("Provider and parameters are required")
|
|
387
|
+
return
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
implementation.setCustomParameters(provider: provider, parameters: parameters) { [weak self] error in
|
|
391
|
+
if let error = error {
|
|
392
|
+
call.reject(error.localizedDescription)
|
|
393
|
+
} else {
|
|
394
|
+
call.resolve()
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
@objc func revokeAccess(_ call: CAPPluginCall) {
|
|
400
|
+
let options = RevokeAccessOptions(
|
|
401
|
+
provider: AuthProvider(rawValue: call.getString("provider") ?? ""),
|
|
402
|
+
token: call.getString("token")
|
|
403
|
+
)
|
|
404
|
+
|
|
405
|
+
implementation.revokeAccess(options: options) { [weak self] error in
|
|
406
|
+
if let error = error {
|
|
407
|
+
call.reject(error.localizedDescription)
|
|
408
|
+
} else {
|
|
409
|
+
call.resolve()
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "capacitor-auth-manager",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "Auth Manager Plugin for Capacitor, provides all the auth options that their provider provides, and provides a subscribable auth state. including google, apple, microsoft, facebook, github, slack, linkedin, email magic link, sms, email/phone/username + password, email code, biometric auth",
|
|
5
5
|
"main": "dist/plugin.cjs.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -54,7 +54,11 @@
|
|
|
54
54
|
"lint": "eslint . --ext ts",
|
|
55
55
|
"prettier": "prettier --write .",
|
|
56
56
|
"prepublishOnly": "npm run build",
|
|
57
|
-
"swiftlint": "cd ios && swiftlint lint --fix --format --path Plugin --verbose"
|
|
57
|
+
"swiftlint": "cd ios && swiftlint lint --fix --format --path Plugin --verbose",
|
|
58
|
+
"configure": "node scripts/configure.js"
|
|
59
|
+
},
|
|
60
|
+
"bin": {
|
|
61
|
+
"capacitor-auth-configure": "./scripts/configure.js"
|
|
58
62
|
},
|
|
59
63
|
"devDependencies": {
|
|
60
64
|
"@capacitor/android": "^7.4.1",
|