@authara/react-native 0.0.0-stage → 0.1.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.
@@ -0,0 +1,42 @@
1
+ // Code generated from authara-core/contract/openapi.yaml; DO NOT EDIT.
2
+ export const autharaActionErrorCodes = {
3
+ login: [
4
+ "account_link_required",
5
+ "forbidden",
6
+ "internal_error",
7
+ "invalid_request",
8
+ "not_found",
9
+ "unauthorized",
10
+ ],
11
+ link: [
12
+ "auth_method_already_linked",
13
+ "forbidden",
14
+ "internal_error",
15
+ "invalid_request",
16
+ "not_found",
17
+ "recent_authentication_required",
18
+ "unauthorized",
19
+ ],
20
+ reauthenticate: [
21
+ "internal_error",
22
+ "invalid_authentication_challenge",
23
+ "invalid_request",
24
+ "not_found",
25
+ "unauthorized",
26
+ ],
27
+ recover: [
28
+ "auth_method_already_linked",
29
+ "forbidden",
30
+ "internal_error",
31
+ "invalid_request",
32
+ "invitation_already_accepted",
33
+ "invitation_email_mismatch",
34
+ "invitation_expired",
35
+ "invitation_not_found",
36
+ "invitation_revoked",
37
+ "not_found",
38
+ "organization_membership_conflict",
39
+ "provider_link_expired",
40
+ "unauthorized",
41
+ ],
42
+ };
@@ -0,0 +1,355 @@
1
+ export interface APIError {
2
+ code: string;
3
+ message: string;
4
+ }
5
+ export interface Account {
6
+ user: AuthUser;
7
+ sessions: Array<AccountSession>;
8
+ sessions_next_cursor?: string;
9
+ auth_methods: Array<AuthMethod>;
10
+ passkeys: Array<AccountPasskey>;
11
+ passkeys_next_cursor?: string;
12
+ }
13
+ export interface AccountPasskey {
14
+ id: string;
15
+ name: string;
16
+ created_at: string;
17
+ last_used_at?: string;
18
+ }
19
+ export interface AccountRecoveryAppleProofRequest {
20
+ challenge_id?: string;
21
+ code: string;
22
+ state: string;
23
+ invitation_token?: string;
24
+ }
25
+ export interface AccountRecoveryGoogleProofRequest {
26
+ challenge_id?: string;
27
+ credential?: string;
28
+ nonce?: string;
29
+ code?: string;
30
+ redirect_uri?: string;
31
+ invitation_token?: string;
32
+ }
33
+ export interface AccountRecoveryLink {
34
+ link_id: string;
35
+ provider: "google" | "apple" | "microsoft";
36
+ proof_methods: Array<"password" | "google" | "apple" | "microsoft">;
37
+ }
38
+ export interface AccountRecoveryMicrosoftProofRequest {
39
+ challenge_id?: string;
40
+ credential: string;
41
+ nonce: string;
42
+ invitation_token?: string;
43
+ }
44
+ export interface AccountRecoveryPasswordProofRequest {
45
+ password: string;
46
+ invitation_token?: string;
47
+ }
48
+ export interface AccountSession {
49
+ id: string;
50
+ current: boolean;
51
+ created_at: string;
52
+ expires_at: string;
53
+ user_agent: string;
54
+ }
55
+ export interface AppleAuthorizationRequest {
56
+ challenge_id?: string;
57
+ code: string;
58
+ state: string;
59
+ invitation_token?: string;
60
+ }
61
+ export interface AppleLoginOptions {
62
+ challenge_id?: string;
63
+ client_id: string;
64
+ redirect_uri: string;
65
+ state: string;
66
+ nonce: string;
67
+ }
68
+ export interface AppleReauthenticationRequest {
69
+ authentication_challenge_id: string;
70
+ challenge_id?: string;
71
+ code: string;
72
+ state: string;
73
+ }
74
+ export interface AuthMethod {
75
+ provider: "password" | "google" | "apple" | "microsoft";
76
+ created_at: string;
77
+ }
78
+ export interface AuthSession {
79
+ user: AuthUser;
80
+ access_token: string;
81
+ refresh_token: string;
82
+ }
83
+ export interface AuthUser {
84
+ id: string;
85
+ email: string;
86
+ email_verified: boolean;
87
+ email_verified_at?: string;
88
+ username: string;
89
+ disabled: boolean;
90
+ created_at: string;
91
+ }
92
+ export interface AuthenticationChallenge {
93
+ id: string;
94
+ expires_at: string;
95
+ }
96
+ export interface AuthenticationChallengeReference {
97
+ authentication_challenge_id: string;
98
+ }
99
+ export interface CSRFToken {
100
+ csrf_token: string;
101
+ }
102
+ export interface Capabilities {
103
+ organization_mode: "personal" | "single" | "multi";
104
+ has_visible_organizations: boolean;
105
+ allows_invitations: boolean;
106
+ allows_public_organization_management: boolean;
107
+ allows_org_switching: boolean;
108
+ allows_user_created_team_orgs: boolean;
109
+ allows_organization_leave: boolean;
110
+ }
111
+ export interface ChallengeReference {
112
+ challenge_id: string;
113
+ }
114
+ export interface ChallengeVerification {
115
+ challenge_id: string;
116
+ code: string;
117
+ }
118
+ export interface ChangePasswordRequest {
119
+ current_password: string;
120
+ new_password: string;
121
+ }
122
+ export interface ChangeUsernameRequest {
123
+ username: string;
124
+ }
125
+ export interface CurrentOrganizationMember {
126
+ user_id: string;
127
+ email: string;
128
+ username: string;
129
+ role: OrganizationRole;
130
+ created_at: string;
131
+ }
132
+ export interface CurrentOrganizationMembers {
133
+ members: Array<CurrentOrganizationMember>;
134
+ next_cursor?: string;
135
+ }
136
+ export interface CurrentUser {
137
+ id: string;
138
+ email: string;
139
+ email_verified: boolean;
140
+ email_verified_at?: string;
141
+ username: string;
142
+ disabled: boolean;
143
+ created_at: string;
144
+ roles: Array<"authara:admin" | "authara:operator">;
145
+ organization: OrganizationSummary;
146
+ }
147
+ export interface EmailChangeRequest {
148
+ new_email: string;
149
+ }
150
+ export interface ErrorResponse {
151
+ error: APIError;
152
+ authentication_challenge?: AuthenticationChallenge;
153
+ reauthenticate_url?: string;
154
+ recovery?: AccountRecoveryLink;
155
+ }
156
+ export interface GoogleLoginOptions {
157
+ challenge_id?: string;
158
+ client_id: string;
159
+ nonce: string;
160
+ }
161
+ export interface GoogleLoginRequest {
162
+ challenge_id?: string;
163
+ credential?: string;
164
+ nonce?: string;
165
+ code?: string;
166
+ redirect_uri?: string;
167
+ }
168
+ export interface GoogleReauthenticationRequest {
169
+ authentication_challenge_id: string;
170
+ challenge_id?: string;
171
+ credential?: string;
172
+ nonce?: string;
173
+ code?: string;
174
+ redirect_uri?: string;
175
+ }
176
+ export interface InvitationGoogleRequest {
177
+ token: string;
178
+ credential?: string;
179
+ nonce?: string;
180
+ code?: string;
181
+ redirect_uri?: string;
182
+ flow: "signup" | "login";
183
+ }
184
+ export interface InvitationGoogleResult {
185
+ status: "authenticated" | "proof_required";
186
+ session?: AuthSession;
187
+ recovery?: AccountRecoveryLink;
188
+ }
189
+ export interface InvitationPasswordLoginRequest {
190
+ token: string;
191
+ password: string;
192
+ }
193
+ export interface InvitationPreview {
194
+ invitation: OrganizationInvitation;
195
+ organization: Organization;
196
+ }
197
+ export interface InvitationTokenRequest {
198
+ token: string;
199
+ }
200
+ export interface Membership {
201
+ organization_id: string;
202
+ user_id: string;
203
+ role: OrganizationRole;
204
+ created_at: string;
205
+ updated_at: string;
206
+ }
207
+ export interface MembershipWithOrganization {
208
+ organization: Organization;
209
+ membership: Membership;
210
+ }
211
+ export interface MicrosoftLoginOptions {
212
+ challenge_id?: string;
213
+ client_id: string;
214
+ authority: string;
215
+ nonce: string;
216
+ }
217
+ export interface MicrosoftLoginRequest {
218
+ challenge_id?: string;
219
+ credential: string;
220
+ nonce: string;
221
+ invitation_token?: string;
222
+ }
223
+ export interface MicrosoftReauthenticationRequest {
224
+ authentication_challenge_id: string;
225
+ challenge_id?: string;
226
+ credential: string;
227
+ nonce: string;
228
+ }
229
+ export interface Organization {
230
+ id: string;
231
+ created_at: string;
232
+ updated_at: string;
233
+ name: string;
234
+ kind: "personal" | "team";
235
+ created_by_user_id?: string;
236
+ }
237
+ export interface OrganizationEnvelope {
238
+ organization: Organization;
239
+ }
240
+ export interface OrganizationInvitation {
241
+ id: string;
242
+ organization_id: string;
243
+ email: string;
244
+ role: OrganizationRole;
245
+ metadata: Record<string, unknown>;
246
+ status: "pending" | "accepted" | "revoked" | "expired";
247
+ expires_at: string;
248
+ invite_url?: string;
249
+ }
250
+ export interface OrganizationInvitationEnvelope {
251
+ invitation: OrganizationInvitation;
252
+ }
253
+ export interface OrganizationInvitations {
254
+ invitations: Array<OrganizationInvitation>;
255
+ next_cursor?: string;
256
+ }
257
+ export interface OrganizationMember {
258
+ organization_id: string;
259
+ user_id: string;
260
+ email: string;
261
+ username: string;
262
+ role: OrganizationRole;
263
+ created_at: string;
264
+ updated_at: string;
265
+ disabled: boolean;
266
+ }
267
+ export interface OrganizationMemberEnvelope {
268
+ member: OrganizationMember;
269
+ }
270
+ export type OrganizationMemberRole = "admin" | "member";
271
+ export interface OrganizationMembers {
272
+ members: Array<OrganizationMember>;
273
+ next_cursor?: string;
274
+ }
275
+ export type OrganizationRole = "owner" | "admin" | "member";
276
+ export interface OrganizationSummaries {
277
+ organizations: Array<OrganizationSummary>;
278
+ next_cursor?: string;
279
+ }
280
+ export interface OrganizationSummary {
281
+ id: string;
282
+ name: string;
283
+ role: OrganizationRole;
284
+ }
285
+ export interface PasskeyAuthenticationFinishRequest {
286
+ challenge_id: string;
287
+ credential: Record<string, unknown>;
288
+ }
289
+ export interface PasskeyOptions {
290
+ challenge_id: string;
291
+ options: Record<string, unknown>;
292
+ }
293
+ export interface PasskeyReauthenticationFinishRequest {
294
+ authentication_challenge_id: string;
295
+ challenge_id: string;
296
+ credential: Record<string, unknown>;
297
+ }
298
+ export interface PasskeyRegistrationFinishRequest {
299
+ challenge_id: string;
300
+ credential: Record<string, unknown>;
301
+ name?: string;
302
+ platform_hint?: string;
303
+ }
304
+ export interface PasswordLoginRequest {
305
+ identifier: string;
306
+ password: string;
307
+ }
308
+ export interface PasswordReauthenticationRequest {
309
+ authentication_challenge_id: string;
310
+ password: string;
311
+ }
312
+ export interface PasswordResetChallengeVerification {
313
+ challenge_id: string;
314
+ code: string;
315
+ }
316
+ export interface PasswordResetRequest {
317
+ email: string;
318
+ new_password: string;
319
+ }
320
+ export interface SetPasswordRequest {
321
+ password: string;
322
+ }
323
+ export interface SignupChallenge {
324
+ challenge_id: string;
325
+ }
326
+ export interface SignupChallengeVerification {
327
+ challenge_id: string;
328
+ code: string;
329
+ }
330
+ export interface SignupRequest {
331
+ email: string;
332
+ password: string;
333
+ invitation_code?: string;
334
+ }
335
+ export interface TokenRefreshRequest {
336
+ refresh_token: string;
337
+ audience?: "app" | "admin" | "operator";
338
+ }
339
+ export interface TokenRevocationRequest {
340
+ refresh_token: string;
341
+ }
342
+ export interface Tokens {
343
+ access_token: string;
344
+ refresh_token: string;
345
+ }
346
+ export interface UpdateOrganizationMemberRequest {
347
+ role: OrganizationMemberRole;
348
+ }
349
+ export interface UpdateOrganizationRequest {
350
+ name: string;
351
+ }
352
+ export interface UserMemberships {
353
+ memberships: Array<MembershipWithOrganization>;
354
+ next_cursor?: string;
355
+ }
@@ -0,0 +1,2 @@
1
+ // Code generated from authara-core/contract/openapi.yaml; DO NOT EDIT.
2
+ export {};
@@ -0,0 +1,11 @@
1
+ export { AutharaApiError, type AutharaAudience, type AutharaClientOptions, type AutharaSessionSnapshot, type AutharaSessionStatus, } from "./client.js";
2
+ export { AutharaProvider, useAuthara, type AutharaProviderProps, type UseAutharaResult, } from "./context.js";
3
+ export { AppleButton, GoogleButton, MicrosoftButton, type AppleButtonProps, type AppleButtonVisualProps, type AutharaButtonLabel, type AutharaButtonMode, type AutharaButtonProps, type AutharaButtonSize, type AutharaButtonVariant, type AutharaColorMode, type GoogleButtonProps, type GoogleButtonVisualProps, type MicrosoftButtonProps, type MicrosoftButtonVisualProps, } from "./buttons.js";
4
+ export { AutharaButtonError, AutharaProviderCancellationError, isAutharaButtonError, isAutharaProviderCancellation, type AutharaButtonErrorCode, type AutharaButtonErrorSource, type AutharaLinkErrorCode, type AutharaLocalErrorCode, type AutharaLoginErrorCode, type AutharaRecoveryErrorCode, type AutharaReauthenticationErrorCode, } from "./button-error.js";
5
+ export { autharaActionErrorCodes, type AutharaContractAction, type AutharaContractErrorCode, } from "./generated/error-codes.js";
6
+ export type { AutharaAccountRecoveryLink, AutharaAction, AutharaActionProps, AutharaActionSuccess, AutharaLinkSuccess, AutharaLoginSuccess, AutharaProviderName, AutharaReauthenticationSuccess, AutharaRecoverySuccess, MaybePromise, } from "./button-contract.js";
7
+ export { AutharaNativeClient, createAuthara, type AppleNativeAdapter, type AutharaNativeClientOptions, type AutharaNativeProviders, type GoogleNativeAdapter, type MicrosoftNativeAdapter, } from "./native-client.js";
8
+ export { createMemoryTokenStorage, type AutharaTokenStorage, } from "./storage.js";
9
+ export { GeneratedAutharaApiClient } from "./generated/api.js";
10
+ export type * from "./generated/api.js";
11
+ export type * from "./generated/types.js";
package/dist/index.js ADDED
@@ -0,0 +1,8 @@
1
+ export { AutharaApiError, } from "./client.js";
2
+ export { AutharaProvider, useAuthara, } from "./context.js";
3
+ export { AppleButton, GoogleButton, MicrosoftButton, } from "./buttons.js";
4
+ export { AutharaButtonError, AutharaProviderCancellationError, isAutharaButtonError, isAutharaProviderCancellation, } from "./button-error.js";
5
+ export { autharaActionErrorCodes, } from "./generated/error-codes.js";
6
+ export { AutharaNativeClient, createAuthara, } from "./native-client.js";
7
+ export { createMemoryTokenStorage, } from "./storage.js";
8
+ export { GeneratedAutharaApiClient } from "./generated/api.js";
@@ -0,0 +1,43 @@
1
+ import type { AutharaAudience, AutharaClientOptions } from "./client.js";
2
+ import type { AutharaActionSuccess, AutharaProviderName, ResolvedAutharaAction } from "./button-contract.js";
3
+ import { GeneratedAutharaApiClient } from "./generated/api.js";
4
+ import type { AppleLoginOptions, AuthSession, GoogleLoginOptions, MicrosoftLoginOptions } from "./generated/types.js";
5
+ export interface GoogleNativeAdapter {
6
+ authorize(options: GoogleLoginOptions): Promise<{
7
+ credential: string;
8
+ }>;
9
+ }
10
+ export interface AppleNativeAdapter {
11
+ authorize(options: AppleLoginOptions): Promise<{
12
+ code: string;
13
+ }>;
14
+ }
15
+ export interface MicrosoftNativeAdapter {
16
+ authorize(options: MicrosoftLoginOptions): Promise<{
17
+ credential: string;
18
+ }>;
19
+ }
20
+ export interface AutharaNativeProviders {
21
+ google?: GoogleNativeAdapter;
22
+ apple?: AppleNativeAdapter;
23
+ microsoft?: MicrosoftNativeAdapter;
24
+ }
25
+ export interface AutharaNativeClientOptions extends AutharaClientOptions {
26
+ providers?: AutharaNativeProviders;
27
+ }
28
+ export declare class AutharaNativeClient extends GeneratedAutharaApiClient {
29
+ private readonly providers;
30
+ constructor(options: AutharaNativeClientOptions);
31
+ restore(): Promise<boolean>;
32
+ signInWithPassword(identifier: string, password: string, audience?: AutharaAudience): Promise<AuthSession>;
33
+ signInWithGoogle(audience?: AutharaAudience): Promise<AuthSession>;
34
+ signInWithApple(audience?: AutharaAudience): Promise<AuthSession>;
35
+ signInWithMicrosoft(audience?: AutharaAudience): Promise<AuthSession>;
36
+ hasNativeProvider(provider: AutharaProviderName): boolean;
37
+ runNativeProviderAction<P extends AutharaProviderName>(provider: P, action: ResolvedAutharaAction): Promise<AutharaActionSuccess<P>>;
38
+ private runGoogleAction;
39
+ private runAppleAction;
40
+ private runMicrosoftAction;
41
+ private requireProvider;
42
+ }
43
+ export declare function createAuthara(options: AutharaNativeClientOptions): AutharaNativeClient;
@@ -0,0 +1,215 @@
1
+ import { GeneratedAutharaApiClient } from "./generated/api.js";
2
+ export class AutharaNativeClient extends GeneratedAutharaApiClient {
3
+ providers;
4
+ constructor(options) {
5
+ super(options);
6
+ this.providers = options.providers ?? {};
7
+ }
8
+ async restore() {
9
+ if (!(await this.restoreTokens()))
10
+ return false;
11
+ try {
12
+ this.setCurrentUser(await this.getCurrentUser());
13
+ return true;
14
+ }
15
+ catch {
16
+ return false;
17
+ }
18
+ }
19
+ signInWithPassword(identifier, password, audience = "app") {
20
+ return this.loginWithPassword({
21
+ audience,
22
+ session_transport: "token",
23
+ body: { identifier, password },
24
+ });
25
+ }
26
+ async signInWithGoogle(audience = "app") {
27
+ const result = await this.runNativeProviderAction("google", {
28
+ action: "login",
29
+ audience,
30
+ });
31
+ if (result.action !== "login")
32
+ throw new Error("Unexpected Google action");
33
+ return result.session;
34
+ }
35
+ async signInWithApple(audience = "app") {
36
+ const result = await this.runNativeProviderAction("apple", {
37
+ action: "login",
38
+ audience,
39
+ });
40
+ if (result.action !== "login")
41
+ throw new Error("Unexpected Apple action");
42
+ return result.session;
43
+ }
44
+ async signInWithMicrosoft(audience = "app") {
45
+ const result = await this.runNativeProviderAction("microsoft", {
46
+ action: "login",
47
+ audience,
48
+ });
49
+ if (result.action !== "login")
50
+ throw new Error("Unexpected Microsoft action");
51
+ return result.session;
52
+ }
53
+ hasNativeProvider(provider) {
54
+ return this.providers[provider] !== undefined;
55
+ }
56
+ runNativeProviderAction(provider, action) {
57
+ switch (provider) {
58
+ case "google":
59
+ return this.runGoogleAction(action);
60
+ case "apple":
61
+ return this.runAppleAction(action);
62
+ case "microsoft":
63
+ return this.runMicrosoftAction(action);
64
+ }
65
+ }
66
+ async runGoogleAction(action) {
67
+ const adapter = this.requireProvider("google", this.providers.google);
68
+ const options = await this.getGoogleLoginOptions({
69
+ session_transport: "token",
70
+ });
71
+ const proof = await adapter.authorize(options);
72
+ const body = {
73
+ credential: proof.credential,
74
+ nonce: options.nonce,
75
+ challenge_id: options.challenge_id,
76
+ };
77
+ switch (action.action) {
78
+ case "login":
79
+ return {
80
+ action: "login",
81
+ provider: "google",
82
+ session: await this.loginWithGoogle({
83
+ audience: action.audience,
84
+ session_transport: "token",
85
+ body,
86
+ }),
87
+ };
88
+ case "link":
89
+ await this.linkCurrentUserGoogle({ body });
90
+ return { action: "link", provider: "google" };
91
+ case "reauthenticate":
92
+ await this.reauthenticateWithGoogle({
93
+ body: {
94
+ credential: proof.credential,
95
+ nonce: options.nonce,
96
+ challenge_id: options.challenge_id,
97
+ authentication_challenge_id: action.authenticationChallengeId,
98
+ },
99
+ });
100
+ return { action: "reauthenticate", provider: "google" };
101
+ case "recover":
102
+ return {
103
+ action: "recover",
104
+ provider: "google",
105
+ session: await this.completeAccountRecoveryLinkWithGoogle({
106
+ linkID: action.recoveryLinkId,
107
+ audience: action.audience,
108
+ body,
109
+ }),
110
+ };
111
+ }
112
+ }
113
+ async runAppleAction(action) {
114
+ const adapter = this.requireProvider("apple", this.providers.apple);
115
+ const options = await this.getAppleLoginOptions({
116
+ session_transport: "token",
117
+ });
118
+ const proof = await adapter.authorize(options);
119
+ const body = {
120
+ code: proof.code,
121
+ state: options.state,
122
+ challenge_id: options.challenge_id,
123
+ };
124
+ switch (action.action) {
125
+ case "login":
126
+ return {
127
+ action: "login",
128
+ provider: "apple",
129
+ session: await this.loginWithApple({
130
+ audience: action.audience,
131
+ session_transport: "token",
132
+ body,
133
+ }),
134
+ };
135
+ case "link":
136
+ await this.linkCurrentUserApple({ body });
137
+ return { action: "link", provider: "apple" };
138
+ case "reauthenticate":
139
+ await this.reauthenticateWithApple({
140
+ body: {
141
+ code: proof.code,
142
+ state: options.state,
143
+ challenge_id: options.challenge_id,
144
+ authentication_challenge_id: action.authenticationChallengeId,
145
+ },
146
+ });
147
+ return { action: "reauthenticate", provider: "apple" };
148
+ case "recover":
149
+ return {
150
+ action: "recover",
151
+ provider: "apple",
152
+ session: await this.completeAccountRecoveryLinkWithApple({
153
+ linkID: action.recoveryLinkId,
154
+ audience: action.audience,
155
+ body,
156
+ }),
157
+ };
158
+ }
159
+ }
160
+ async runMicrosoftAction(action) {
161
+ const adapter = this.requireProvider("microsoft", this.providers.microsoft);
162
+ const options = await this.getMicrosoftLoginOptions({
163
+ session_transport: "token",
164
+ });
165
+ const proof = await adapter.authorize(options);
166
+ const body = {
167
+ credential: proof.credential,
168
+ nonce: options.nonce,
169
+ challenge_id: options.challenge_id,
170
+ };
171
+ switch (action.action) {
172
+ case "login":
173
+ return {
174
+ action: "login",
175
+ provider: "microsoft",
176
+ session: await this.loginWithMicrosoft({
177
+ audience: action.audience,
178
+ session_transport: "token",
179
+ body,
180
+ }),
181
+ };
182
+ case "link":
183
+ await this.linkCurrentUserMicrosoft({ body });
184
+ return { action: "link", provider: "microsoft" };
185
+ case "reauthenticate":
186
+ await this.reauthenticateWithMicrosoft({
187
+ body: {
188
+ credential: proof.credential,
189
+ nonce: options.nonce,
190
+ challenge_id: options.challenge_id,
191
+ authentication_challenge_id: action.authenticationChallengeId,
192
+ },
193
+ });
194
+ return { action: "reauthenticate", provider: "microsoft" };
195
+ case "recover":
196
+ return {
197
+ action: "recover",
198
+ provider: "microsoft",
199
+ session: await this.completeAccountRecoveryLinkWithMicrosoft({
200
+ linkID: action.recoveryLinkId,
201
+ audience: action.audience,
202
+ body,
203
+ }),
204
+ };
205
+ }
206
+ }
207
+ requireProvider(name, adapter) {
208
+ if (!adapter)
209
+ throw new Error(`Authara ${name} native adapter is not configured`);
210
+ return adapter;
211
+ }
212
+ }
213
+ export function createAuthara(options) {
214
+ return new AutharaNativeClient(options);
215
+ }
@@ -0,0 +1,5 @@
1
+ import type { GoogleNativeAdapter } from "./native-client.js";
2
+ export interface NitroGoogleSignInOptions {
3
+ iosClientId?: string;
4
+ }
5
+ export declare function createNitroGoogleSignIn(config?: NitroGoogleSignInOptions): GoogleNativeAdapter;