@leisuresaas/react-native 0.6.3-dev.3 → 0.6.3-dev.4

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/public-auth.ts +14 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leisuresaas/react-native",
3
- "version": "0.6.3-dev.3",
3
+ "version": "0.6.3-dev.4",
4
4
  "description": "React Native SDK for LeisureSaas: OAuth, Public Ads/App Config, Drive User Plane (publishable keys). Frontend-only — no Integration Key.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -121,10 +121,22 @@ export async function login(
121
121
 
122
122
  export async function loginWithGoogle(
123
123
  ctx: PublicAuthContext,
124
- input: { idToken: string; password?: string; locale?: string },
124
+ input: {
125
+ idToken?: string;
126
+ authorizationCode?: string;
127
+ redirectUri?: string;
128
+ codeVerifier?: string;
129
+ password?: string;
130
+ locale?: string;
131
+ },
125
132
  ): Promise<AuthTokens> {
126
133
  const resp = await publicAuthRequest<TokenJSON>(ctx, "/login/google", {
127
- id_token: input.idToken, password: input.password ?? "", locale: input.locale ?? "",
134
+ id_token: input.idToken ?? "",
135
+ authorization_code: input.authorizationCode ?? "",
136
+ redirect_uri: input.redirectUri ?? "",
137
+ code_verifier: input.codeVerifier ?? "",
138
+ password: input.password ?? "",
139
+ locale: input.locale ?? "",
128
140
  });
129
141
  return tokensFromJSON(resp);
130
142
  }