@ovok/native 1.16.1-dev.2147 → 1.16.1-dev.2149

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 (108) hide show
  1. package/lib/commonjs/modules/auth/google-return-page/index.js +24 -0
  2. package/lib/commonjs/modules/auth/google-return-page/index.js.map +1 -0
  3. package/lib/commonjs/modules/auth/hooks/use-social-sign-in.web.js +15 -0
  4. package/lib/commonjs/modules/auth/hooks/use-social-sign-in.web.js.map +1 -0
  5. package/lib/commonjs/modules/auth/index.js +21 -10
  6. package/lib/commonjs/modules/auth/index.js.map +1 -1
  7. package/lib/commonjs/modules/auth/session/logout-session.js +1 -1
  8. package/lib/commonjs/modules/auth/sign-in/components/social-logins/apple-login-button.web.js +73 -0
  9. package/lib/commonjs/modules/auth/sign-in/components/social-logins/apple-login-button.web.js.map +1 -0
  10. package/lib/commonjs/modules/auth/sign-in/components/social-logins/apple-login.js +1 -1
  11. package/lib/commonjs/modules/auth/sign-in/components/social-logins/google-login-button.web.js +73 -0
  12. package/lib/commonjs/modules/auth/sign-in/components/social-logins/google-login-button.web.js.map +1 -0
  13. package/lib/commonjs/modules/auth/sign-in/components/social-logins/google-login.js +1 -1
  14. package/lib/commonjs/modules/auth/sign-in/index.js +24 -0
  15. package/lib/commonjs/modules/auth/sign-in/index.js.map +1 -1
  16. package/lib/commonjs/modules/auth/sign-in/utils/apple-web-sign-in.js +90 -0
  17. package/lib/commonjs/modules/auth/sign-in/utils/apple-web-sign-in.js.map +1 -0
  18. package/lib/commonjs/modules/auth/sign-in/utils/google-redirect-sign-in.js +89 -0
  19. package/lib/commonjs/modules/auth/sign-in/utils/google-redirect-sign-in.js.map +1 -0
  20. package/lib/commonjs/modules/auth/sign-in/utils/jwt-claims.js +21 -0
  21. package/lib/commonjs/modules/auth/sign-in/utils/jwt-claims.js.map +1 -0
  22. package/lib/commonjs/modules/auth/utils/sign-out-google.web.js +10 -0
  23. package/lib/commonjs/modules/auth/utils/sign-out-google.web.js.map +1 -0
  24. package/lib/module/modules/auth/google-return-page/index.js +21 -0
  25. package/lib/module/modules/auth/google-return-page/index.js.map +1 -0
  26. package/lib/module/modules/auth/hooks/use-social-sign-in.web.js +10 -0
  27. package/lib/module/modules/auth/hooks/use-social-sign-in.web.js.map +1 -0
  28. package/lib/module/modules/auth/index.js +2 -1
  29. package/lib/module/modules/auth/index.js.map +1 -1
  30. package/lib/module/modules/auth/session/logout-session.js +1 -1
  31. package/lib/module/modules/auth/session/logout-session.js.map +1 -1
  32. package/lib/module/modules/auth/sign-in/components/social-logins/apple-login-button.web.js +67 -0
  33. package/lib/module/modules/auth/sign-in/components/social-logins/apple-login-button.web.js.map +1 -0
  34. package/lib/module/modules/auth/sign-in/components/social-logins/apple-login.js +1 -1
  35. package/lib/module/modules/auth/sign-in/components/social-logins/apple-login.js.map +1 -1
  36. package/lib/module/modules/auth/sign-in/components/social-logins/google-login-button.web.js +68 -0
  37. package/lib/module/modules/auth/sign-in/components/social-logins/google-login-button.web.js.map +1 -0
  38. package/lib/module/modules/auth/sign-in/components/social-logins/google-login.js +1 -1
  39. package/lib/module/modules/auth/sign-in/components/social-logins/google-login.js.map +1 -1
  40. package/lib/module/modules/auth/sign-in/index.js +2 -0
  41. package/lib/module/modules/auth/sign-in/index.js.map +1 -1
  42. package/lib/module/modules/auth/sign-in/utils/apple-web-sign-in.js +84 -0
  43. package/lib/module/modules/auth/sign-in/utils/apple-web-sign-in.js.map +1 -0
  44. package/lib/module/modules/auth/sign-in/utils/google-redirect-sign-in.js +84 -0
  45. package/lib/module/modules/auth/sign-in/utils/google-redirect-sign-in.js.map +1 -0
  46. package/lib/module/modules/auth/sign-in/utils/jwt-claims.js +17 -0
  47. package/lib/module/modules/auth/sign-in/utils/jwt-claims.js.map +1 -0
  48. package/lib/module/modules/auth/utils/sign-out-google.web.js +5 -0
  49. package/lib/module/modules/auth/utils/sign-out-google.web.js.map +1 -0
  50. package/lib/typescript/commonjs/src/modules/auth/google-return-page/index.d.ts +8 -0
  51. package/lib/typescript/commonjs/src/modules/auth/google-return-page/index.d.ts.map +1 -0
  52. package/lib/typescript/commonjs/src/modules/auth/hooks/use-social-sign-in.web.d.ts +7 -0
  53. package/lib/typescript/commonjs/src/modules/auth/hooks/use-social-sign-in.web.d.ts.map +1 -0
  54. package/lib/typescript/commonjs/src/modules/auth/index.d.ts +1 -0
  55. package/lib/typescript/commonjs/src/modules/auth/index.d.ts.map +1 -1
  56. package/lib/typescript/commonjs/src/modules/auth/register/components/register.d.ts +2 -2
  57. package/lib/typescript/commonjs/src/modules/auth/sign-in/components/sign-in.d.ts +2 -2
  58. package/lib/typescript/commonjs/src/modules/auth/sign-in/components/social-logins/apple-login-button.web.d.ts +5 -0
  59. package/lib/typescript/commonjs/src/modules/auth/sign-in/components/social-logins/apple-login-button.web.d.ts.map +1 -0
  60. package/lib/typescript/commonjs/src/modules/auth/sign-in/components/social-logins/apple-login.d.ts +1 -1
  61. package/lib/typescript/commonjs/src/modules/auth/sign-in/components/social-logins/google-login-button.web.d.ts +5 -0
  62. package/lib/typescript/commonjs/src/modules/auth/sign-in/components/social-logins/google-login-button.web.d.ts.map +1 -0
  63. package/lib/typescript/commonjs/src/modules/auth/sign-in/components/social-logins/google-login.d.ts +1 -1
  64. package/lib/typescript/commonjs/src/modules/auth/sign-in/components/social-logins/social-logins.d.ts +2 -2
  65. package/lib/typescript/commonjs/src/modules/auth/sign-in/index.d.ts +2 -0
  66. package/lib/typescript/commonjs/src/modules/auth/sign-in/index.d.ts.map +1 -1
  67. package/lib/typescript/commonjs/src/modules/auth/sign-in/types/apple-login-props.d.ts +13 -0
  68. package/lib/typescript/commonjs/src/modules/auth/sign-in/types/apple-login-props.d.ts.map +1 -1
  69. package/lib/typescript/commonjs/src/modules/auth/sign-in/types/google-login-props.d.ts +13 -0
  70. package/lib/typescript/commonjs/src/modules/auth/sign-in/types/google-login-props.d.ts.map +1 -1
  71. package/lib/typescript/commonjs/src/modules/auth/sign-in/utils/apple-web-sign-in.d.ts +17 -0
  72. package/lib/typescript/commonjs/src/modules/auth/sign-in/utils/apple-web-sign-in.d.ts.map +1 -0
  73. package/lib/typescript/commonjs/src/modules/auth/sign-in/utils/google-redirect-sign-in.d.ts +14 -0
  74. package/lib/typescript/commonjs/src/modules/auth/sign-in/utils/google-redirect-sign-in.d.ts.map +1 -0
  75. package/lib/typescript/commonjs/src/modules/auth/sign-in/utils/jwt-claims.d.ts +9 -0
  76. package/lib/typescript/commonjs/src/modules/auth/sign-in/utils/jwt-claims.d.ts.map +1 -0
  77. package/lib/typescript/commonjs/src/modules/auth/utils/sign-out-google.web.d.ts +3 -0
  78. package/lib/typescript/commonjs/src/modules/auth/utils/sign-out-google.web.d.ts.map +1 -0
  79. package/lib/typescript/module/src/modules/auth/google-return-page/index.d.ts +8 -0
  80. package/lib/typescript/module/src/modules/auth/google-return-page/index.d.ts.map +1 -0
  81. package/lib/typescript/module/src/modules/auth/hooks/use-social-sign-in.web.d.ts +7 -0
  82. package/lib/typescript/module/src/modules/auth/hooks/use-social-sign-in.web.d.ts.map +1 -0
  83. package/lib/typescript/module/src/modules/auth/index.d.ts +1 -0
  84. package/lib/typescript/module/src/modules/auth/index.d.ts.map +1 -1
  85. package/lib/typescript/module/src/modules/auth/register/components/register.d.ts +2 -2
  86. package/lib/typescript/module/src/modules/auth/sign-in/components/sign-in.d.ts +2 -2
  87. package/lib/typescript/module/src/modules/auth/sign-in/components/social-logins/apple-login-button.web.d.ts +5 -0
  88. package/lib/typescript/module/src/modules/auth/sign-in/components/social-logins/apple-login-button.web.d.ts.map +1 -0
  89. package/lib/typescript/module/src/modules/auth/sign-in/components/social-logins/apple-login.d.ts +1 -1
  90. package/lib/typescript/module/src/modules/auth/sign-in/components/social-logins/google-login-button.web.d.ts +5 -0
  91. package/lib/typescript/module/src/modules/auth/sign-in/components/social-logins/google-login-button.web.d.ts.map +1 -0
  92. package/lib/typescript/module/src/modules/auth/sign-in/components/social-logins/google-login.d.ts +1 -1
  93. package/lib/typescript/module/src/modules/auth/sign-in/components/social-logins/social-logins.d.ts +2 -2
  94. package/lib/typescript/module/src/modules/auth/sign-in/index.d.ts +2 -0
  95. package/lib/typescript/module/src/modules/auth/sign-in/index.d.ts.map +1 -1
  96. package/lib/typescript/module/src/modules/auth/sign-in/types/apple-login-props.d.ts +13 -0
  97. package/lib/typescript/module/src/modules/auth/sign-in/types/apple-login-props.d.ts.map +1 -1
  98. package/lib/typescript/module/src/modules/auth/sign-in/types/google-login-props.d.ts +13 -0
  99. package/lib/typescript/module/src/modules/auth/sign-in/types/google-login-props.d.ts.map +1 -1
  100. package/lib/typescript/module/src/modules/auth/sign-in/utils/apple-web-sign-in.d.ts +17 -0
  101. package/lib/typescript/module/src/modules/auth/sign-in/utils/apple-web-sign-in.d.ts.map +1 -0
  102. package/lib/typescript/module/src/modules/auth/sign-in/utils/google-redirect-sign-in.d.ts +14 -0
  103. package/lib/typescript/module/src/modules/auth/sign-in/utils/google-redirect-sign-in.d.ts.map +1 -0
  104. package/lib/typescript/module/src/modules/auth/sign-in/utils/jwt-claims.d.ts +9 -0
  105. package/lib/typescript/module/src/modules/auth/sign-in/utils/jwt-claims.d.ts.map +1 -0
  106. package/lib/typescript/module/src/modules/auth/utils/sign-out-google.web.d.ts +3 -0
  107. package/lib/typescript/module/src/modules/auth/utils/sign-out-google.web.d.ts.map +1 -0
  108. package/package.json +1 -1
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.jwtClaims = void 0;
7
+ /** The claims web sign-in reads from a provider's JWT. */
8
+
9
+ const asClaims = value => typeof value === "object" && value !== null ? value : {};
10
+
11
+ /** A JWT's claims, read without checking the signature; Ovok verifies the token itself. */
12
+ const jwtClaims = jwt => {
13
+ try {
14
+ const payload = (jwt.split(".")[1] ?? "").replace(/-/g, "+").replace(/_/g, "/");
15
+ return asClaims(JSON.parse(atob(payload)));
16
+ } catch {
17
+ return {};
18
+ }
19
+ };
20
+ exports.jwtClaims = jwtClaims;
21
+ //# sourceMappingURL=jwt-claims.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["asClaims","value","jwtClaims","jwt","payload","split","replace","JSON","parse","atob","exports"],"sourceRoot":"../../../../../../src","sources":["modules/auth/sign-in/utils/jwt-claims.ts"],"mappings":";;;;;;AAAA;;AAMA,MAAMA,QAAQ,GAAIC,KAAc,IAC9B,OAAOA,KAAK,KAAK,QAAQ,IAAIA,KAAK,KAAK,IAAI,GAAIA,KAAK,GAAiB,CAAC,CAAC;;AAEzE;AACA,MAAMC,SAAS,GAAIC,GAAW,IAAgB;EAC5C,IAAI;IACF,MAAMC,OAAO,GAAG,CAACD,GAAG,CAACE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,EAAEC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAACA,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC;IAE/E,OAAON,QAAQ,CAACO,IAAI,CAACC,KAAK,CAACC,IAAI,CAACL,OAAO,CAAC,CAAC,CAAC;EAC5C,CAAC,CAAC,MAAM;IACN,OAAO,CAAC,CAAC;EACX;AACF,CAAC;AAACM,OAAA,CAAAR,SAAA,GAAAA,SAAA","ignoreList":[]}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.signOutGoogleIfNeeded = void 0;
7
+ /** The web keeps no Google account in the app, so there is nothing to clear. */
8
+ const signOutGoogleIfNeeded = async () => undefined;
9
+ exports.signOutGoogleIfNeeded = signOutGoogleIfNeeded;
10
+ //# sourceMappingURL=sign-out-google.web.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["signOutGoogleIfNeeded","undefined","exports"],"sourceRoot":"../../../../../src","sources":["modules/auth/utils/sign-out-google.web.ts"],"mappings":";;;;;;AAAA;AACO,MAAMA,qBAAqB,GAAG,MAAAA,CAAA,KAA2BC,SAAS;AAACC,OAAA,CAAAF,qBAAA,GAAAA,qBAAA","ignoreList":[]}
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+
3
+ import { GOOGLE_ANSWER_KEY, GOOGLE_REQUEST_KEY } from "../sign-in/utils/google-redirect-sign-in.js";
4
+
5
+ /**
6
+ * The page Google returns to when `GoogleLogin` signs in on the web.
7
+ *
8
+ * Serve it as a static file at the redirect URI, by default `/oauth/google.html`. It keeps Google's answer
9
+ * for this tab and sends the tab back to the sign-in screen, so the token never stays in the address.
10
+ */
11
+ export const GOOGLE_RETURN_PAGE_HTML = `<!doctype html>
12
+ <meta charset="utf-8">
13
+ <title>Signing in</title>
14
+ <script>
15
+ var request = JSON.parse(sessionStorage.getItem("${GOOGLE_REQUEST_KEY}") || "{}");
16
+ var target = new URL(request.returnTo || "/", location.origin);
17
+ sessionStorage.setItem("${GOOGLE_ANSWER_KEY}", location.hash.slice(1));
18
+ location.replace(target.origin === location.origin ? target.href : "/");
19
+ </script>
20
+ `;
21
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["GOOGLE_ANSWER_KEY","GOOGLE_REQUEST_KEY","GOOGLE_RETURN_PAGE_HTML"],"sourceRoot":"../../../../../src","sources":["modules/auth/google-return-page/index.ts"],"mappings":";;AAAA,SACEA,iBAAiB,EACjBC,kBAAkB,QACb,6CAA0C;;AAEjD;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,uBAA+B,GAAG;AAC/C;AACA;AACA;AACA,qDAAqDD,kBAAkB;AACvE;AACA,4BAA4BD,iBAAiB;AAC7C;AACA;AACA,CAAC","ignoreList":[]}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+
3
+ import { useAuthAction } from "./use-auth-action.js";
4
+ const NOT_ON_THE_WEB = "useSocialSignIn is not available on the web; render SignIn.SocialLogins.GoogleLogin or AppleLogin instead";
5
+
6
+ /** Rejects: the web signs in through the `SignIn.SocialLogins` buttons, which leave and return to the page. */
7
+ export const useSocialSignIn = _options => useAuthAction(async () => {
8
+ throw new Error(NOT_ON_THE_WEB);
9
+ });
10
+ //# sourceMappingURL=use-social-sign-in.web.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["useAuthAction","NOT_ON_THE_WEB","useSocialSignIn","_options","Error"],"sourceRoot":"../../../../../src","sources":["modules/auth/hooks/use-social-sign-in.web.ts"],"mappings":";;AAGA,SAASA,aAAa,QAAQ,sBAAmB;AAEjD,MAAMC,cAAc,GAClB,2GAA2G;;AAE7G;AACA,OAAO,MAAMC,eAAe,GAAIC,QAA6B,IAC3DH,aAAa,CAAC,YAA8B;EAC1C,MAAM,IAAII,KAAK,CAACH,cAAc,CAAC;AACjC,CAAC,CAAC","ignoreList":[]}
@@ -9,6 +9,7 @@
9
9
  */
10
10
  import "./default-translation.js";
11
11
  export * from "./sign-in/index.js";
12
+ export * from "./google-return-page/index.js";
12
13
  export * from "./register/index.js";
13
14
  export * from "./profile/index.js";
14
15
  export * from "./delete-account-button/index.js";
@@ -18,7 +19,7 @@ export * from "./hooks/use-rate-limit-cooldown.js";
18
19
  export * from "./hooks/use-auth-action.js";
19
20
  export * from "./hooks/use-sign-in.js";
20
21
  export * from "./hooks/use-accept-invite-link.js";
21
- export * from "./hooks/use-social-sign-in.js";
22
+ export * from "./hooks/use-social-sign-in";
22
23
  export * from "./hooks/use-sign-out.js";
23
24
  export * from "./hooks/use-delete-account.js";
24
25
  export * from "./utils/rate-limit.js";
@@ -1 +1 @@
1
- {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["modules/auth/index.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,0BAAuB;AAE9B,cAAc,oBAAW;AACzB,cAAc,qBAAY;AAC1B,cAAc,oBAAW;AACzB,cAAc,kCAAyB;AACvC,cAAc,0BAAiB;AAC/B,cAAc,2BAAkB;AAChC,cAAc,oCAAiC;AAC/C,cAAc,4BAAyB;AACvC,cAAc,wBAAqB;AACnC,cAAc,mCAAgC;AAC9C,cAAc,+BAA4B;AAC1C,cAAc,yBAAsB;AACpC,cAAc,+BAA4B;AAC1C,cAAc,uBAAoB;AAClC,cAAc,0BAAuB;AACrC,cAAc,wBAAqB;AACnC,cAAc,oBAAW","ignoreList":[]}
1
+ {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["modules/auth/index.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,0BAAuB;AAE9B,cAAc,oBAAW;AACzB,cAAc,+BAAsB;AACpC,cAAc,qBAAY;AAC1B,cAAc,oBAAW;AACzB,cAAc,kCAAyB;AACvC,cAAc,0BAAiB;AAC/B,cAAc,2BAAkB;AAChC,cAAc,oCAAiC;AAC/C,cAAc,4BAAyB;AACvC,cAAc,wBAAqB;AACnC,cAAc,mCAAgC;AAC9C,cAAc,4BAA4B;AAC1C,cAAc,yBAAsB;AACpC,cAAc,+BAA4B;AAC1C,cAAc,uBAAoB;AAClC,cAAc,0BAAuB;AACrC,cAAc,wBAAqB;AACnC,cAAc,oBAAW","ignoreList":[]}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- import { signOutGoogleIfNeeded } from "../utils/sign-out-google.js";
3
+ import { signOutGoogleIfNeeded } from "../utils/sign-out-google";
4
4
  const logoutRequests = new WeakMap();
5
5
  const logoutInProgress = new WeakSet();
6
6
  const isLogoutInProgress = client => logoutInProgress.has(client);
@@ -1 +1 @@
1
- {"version":3,"names":["signOutGoogleIfNeeded","logoutRequests","WeakMap","logoutInProgress","WeakSet","isLogoutInProgress","client","has","logoutSession","key","pending","get","add","request","auth","logout","finally","delete","set"],"sourceRoot":"../../../../../src","sources":["modules/auth/session/logout-session.ts"],"mappings":";;AAEA,SAASA,qBAAqB,QAAQ,6BAA0B;AAEhE,MAAMC,cAAc,GAAG,IAAIC,OAAO,CAAwB,CAAC;AAC3D,MAAMC,gBAAgB,GAAG,IAAIC,OAAO,CAAS,CAAC;AAE9C,MAAMC,kBAAkB,GAAIC,MAAc,IACxCH,gBAAgB,CAACI,GAAG,CAACD,MAAM,CAAC;;AAE9B;AACA,MAAME,aAAa,GAAIF,MAAY,IAAoB;EACrD,MAAMG,GAAG,GAAGH,MAAgB;EAC5B,MAAMI,OAAO,GAAGT,cAAc,CAACU,GAAG,CAACF,GAAG,CAAC;EAEvC,IAAIC,OAAO,EAAE;IACX,OAAOA,OAAO;EAChB;EAEAP,gBAAgB,CAACS,GAAG,CAACH,GAAG,CAAC;EAEzB,MAAMI,OAAO,GAAG,CAAC,YAAY;IAC3B,IAAI;MACF,MAAMP,MAAM,CAACQ,IAAI,CAACC,MAAM,CAAC,CAAC;IAC5B,CAAC,SAAS;MACR,MAAMf,qBAAqB,CAAC,CAAC;IAC/B;EACF,CAAC,EAAE,CAAC,CAACgB,OAAO,CAAC,MAAM;IACjBf,cAAc,CAACgB,MAAM,CAACR,GAAG,CAAC;IAC1BN,gBAAgB,CAACc,MAAM,CAACR,GAAG,CAAC;EAC9B,CAAC,CAAC;EAEFR,cAAc,CAACiB,GAAG,CAACT,GAAG,EAAEI,OAAO,CAAC;EAEhC,OAAOA,OAAO;AAChB,CAAC;AAED,SAASR,kBAAkB,EAAEG,aAAa","ignoreList":[]}
1
+ {"version":3,"names":["signOutGoogleIfNeeded","logoutRequests","WeakMap","logoutInProgress","WeakSet","isLogoutInProgress","client","has","logoutSession","key","pending","get","add","request","auth","logout","finally","delete","set"],"sourceRoot":"../../../../../src","sources":["modules/auth/session/logout-session.ts"],"mappings":";;AAEA,SAASA,qBAAqB,QAAQ,0BAA0B;AAEhE,MAAMC,cAAc,GAAG,IAAIC,OAAO,CAAwB,CAAC;AAC3D,MAAMC,gBAAgB,GAAG,IAAIC,OAAO,CAAS,CAAC;AAE9C,MAAMC,kBAAkB,GAAIC,MAAc,IACxCH,gBAAgB,CAACI,GAAG,CAACD,MAAM,CAAC;;AAE9B;AACA,MAAME,aAAa,GAAIF,MAAY,IAAoB;EACrD,MAAMG,GAAG,GAAGH,MAAgB;EAC5B,MAAMI,OAAO,GAAGT,cAAc,CAACU,GAAG,CAACF,GAAG,CAAC;EAEvC,IAAIC,OAAO,EAAE;IACX,OAAOA,OAAO;EAChB;EAEAP,gBAAgB,CAACS,GAAG,CAACH,GAAG,CAAC;EAEzB,MAAMI,OAAO,GAAG,CAAC,YAAY;IAC3B,IAAI;MACF,MAAMP,MAAM,CAACQ,IAAI,CAACC,MAAM,CAAC,CAAC;IAC5B,CAAC,SAAS;MACR,MAAMf,qBAAqB,CAAC,CAAC;IAC/B;EACF,CAAC,EAAE,CAAC,CAACgB,OAAO,CAAC,MAAM;IACjBf,cAAc,CAACgB,MAAM,CAACR,GAAG,CAAC;IAC1BN,gBAAgB,CAACc,MAAM,CAACR,GAAG,CAAC;EAC9B,CAAC,CAAC;EAEFR,cAAc,CAACiB,GAAG,CAACT,GAAG,EAAEI,OAAO,CAAC;EAEhC,OAAOA,OAAO;AAChB,CAAC;AAED,SAASR,kBAAkB,EAAEG,aAAa","ignoreList":[]}
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+
3
+ import { useOvok } from "@ovok/core/next/react";
4
+ import * as React from "react";
5
+ import { parseSignInError } from "../../../utils/sign-in-error.js";
6
+ import { isAppleCancel, loadAppleScript, signInWithApple } from "../../utils/apple-web-sign-in.js";
7
+ import { SocialLoginButton } from "./social-login-button.js";
8
+ import { jsx as _jsx } from "react/jsx-runtime";
9
+ const AppleServicesLoginButton = ({
10
+ appleServicesId,
11
+ appleRedirectUri,
12
+ internalId,
13
+ onSuccess,
14
+ onError,
15
+ testID,
16
+ style,
17
+ disabled,
18
+ children,
19
+ ...props
20
+ }) => {
21
+ const client = useOvok();
22
+ const [isLoading, setIsLoading] = React.useState(false);
23
+ const handleAppleLogin = React.useCallback(async () => {
24
+ try {
25
+ setIsLoading(true);
26
+ const credentials = await signInWithApple({
27
+ servicesId: appleServicesId,
28
+ redirectUri: appleRedirectUri
29
+ });
30
+ const loginResponse = await client.auth.socialLogin("apple", {
31
+ ...credentials,
32
+ internalId
33
+ });
34
+ onSuccess?.(loginResponse);
35
+ } catch (cause) {
36
+ if (!isAppleCancel(cause)) {
37
+ onError?.(parseSignInError(cause).error);
38
+ }
39
+ } finally {
40
+ setIsLoading(false);
41
+ }
42
+ }, [appleRedirectUri, appleServicesId, client, internalId, onError, onSuccess]);
43
+
44
+ // Browsers only open the popup right after a tap, so Apple's script is loaded before one.
45
+ React.useEffect(() => {
46
+ loadAppleScript().catch(() => undefined);
47
+ }, []);
48
+ return /*#__PURE__*/_jsx(SocialLoginButton, {
49
+ ...props,
50
+ backgroundColor: "#000",
51
+ style: style,
52
+ disabled: disabled || isLoading,
53
+ onPress: handleAppleLogin,
54
+ testID: testID,
55
+ children: children
56
+ });
57
+ };
58
+
59
+ /** Sign in with Apple in a popup, for the Services ID registered for this site; renders nothing without one. */
60
+ export const AppleLoginButton = ({
61
+ appleServicesId,
62
+ ...props
63
+ }) => appleServicesId ? /*#__PURE__*/_jsx(AppleServicesLoginButton, {
64
+ ...props,
65
+ appleServicesId: appleServicesId
66
+ }) : null;
67
+ //# sourceMappingURL=apple-login-button.web.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["useOvok","React","parseSignInError","isAppleCancel","loadAppleScript","signInWithApple","SocialLoginButton","jsx","_jsx","AppleServicesLoginButton","appleServicesId","appleRedirectUri","internalId","onSuccess","onError","testID","style","disabled","children","props","client","isLoading","setIsLoading","useState","handleAppleLogin","useCallback","credentials","servicesId","redirectUri","loginResponse","auth","socialLogin","cause","error","useEffect","catch","undefined","backgroundColor","onPress","AppleLoginButton"],"sourceRoot":"../../../../../../../src","sources":["modules/auth/sign-in/components/social-logins/apple-login-button.web.tsx"],"mappings":";;AAAA,SAASA,OAAO,QAAQ,uBAAuB;AAC/C,OAAO,KAAKC,KAAK,MAAM,OAAO;AAE9B,SAASC,gBAAgB,QAAQ,iCAA8B;AAE/D,SACEC,aAAa,EACbC,eAAe,EACfC,eAAe,QACV,kCAA+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EAAE,CAAC;EAEN,oBACE5B,IAAA,CAACF,iBAAiB;IAAA,GACZa,KAAK;IACTkB,eAAe,EAAC,MAAM;IACtBrB,KAAK,EAAEA,KAAM;IACbC,QAAQ,EAAEA,QAAQ,IAAII,SAAU;IAChCiB,OAAO,EAAEd,gBAAiB;IAC1BT,MAAM,EAAEA,MAAO;IAAAG,QAAA,EAEdA;EAAQ,CACQ,CAAC;AAExB,CAAC;;AAED;AACA,OAAO,MAAMqB,gBAAgB,GAAGA,CAAC;EAC/B7B,eAAe;EACf,GAAGS;AACqC,CAAC,KACzCT,eAAe,gBACbF,IAAA,CAACC,wBAAwB;EAAA,GAAKU,KAAK;EAAET,eAAe,EAAEA;AAAgB,CAAE,CAAC,GACvE,IAAI","ignoreList":[]}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- import { AppleLoginButton } from "./apple-login-button.js";
3
+ import { AppleLoginButton } from "./apple-login-button";
4
4
  import { AppleLoginIcon } from "./apple-login-icon.js";
5
5
  import { AppleLoginText } from "./apple-login-text.js";
6
6
 
@@ -1 +1 @@
1
- {"version":3,"names":["AppleLoginButton","AppleLoginIcon","AppleLoginText","AppleLogin","Object","assign","Icon","Text"],"sourceRoot":"../../../../../../../src","sources":["modules/auth/sign-in/components/social-logins/apple-login.tsx"],"mappings":";;AAAA,SAASA,gBAAgB,QAAQ,yBAAsB;AACvD,SAASC,cAAc,QAAQ,uBAAoB;AACnD,SAASC,cAAc,QAAQ,uBAAoB;;AAEnD;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,UAAU,GAAGC,MAAM,CAACC,MAAM,CAACL,gBAAgB,EAAE;EACxD;EACAM,IAAI,EAAEL,cAAc;EAEpB;EACAM,IAAI,EAAEL;AACR,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["AppleLoginButton","AppleLoginIcon","AppleLoginText","AppleLogin","Object","assign","Icon","Text"],"sourceRoot":"../../../../../../../src","sources":["modules/auth/sign-in/components/social-logins/apple-login.tsx"],"mappings":";;AAAA,SAASA,gBAAgB,QAAQ,sBAAsB;AACvD,SAASC,cAAc,QAAQ,uBAAoB;AACnD,SAASC,cAAc,QAAQ,uBAAoB;;AAEnD;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,UAAU,GAAGC,MAAM,CAACC,MAAM,CAACL,gBAAgB,EAAE;EACxD;EACAM,IAAI,EAAEL,cAAc;EAEpB;EACAM,IAAI,EAAEL;AACR,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+
3
+ import { useOvok } from "@ovok/core/next/react";
4
+ import * as React from "react";
5
+ import { useAppTheme } from "../../../../theme/index.js";
6
+ import { parseSignInError } from "../../../utils/sign-in-error.js";
7
+ import { startGoogleSignIn, takeGoogleIdToken } from "../../utils/google-redirect-sign-in.js";
8
+ import { SocialLoginButton } from "./social-login-button.js";
9
+
10
+ /** Google's sign-in page in this tab; back on the sign-in screen, the ID token it sent signs the user in. */
11
+ import { jsx as _jsx } from "react/jsx-runtime";
12
+ export const GoogleLoginButton = ({
13
+ googleIosClientId: _googleIosClientId,
14
+ googleWebClientId,
15
+ googleRedirectUri,
16
+ internalId,
17
+ onSuccess,
18
+ onError,
19
+ testID,
20
+ style,
21
+ disabled,
22
+ children,
23
+ ...props
24
+ }) => {
25
+ const theme = useAppTheme();
26
+ const client = useOvok();
27
+ const [isLoading, setIsLoading] = React.useState(false);
28
+ const signInWithIdToken = React.useCallback(async idToken => {
29
+ try {
30
+ setIsLoading(true);
31
+ const loginResponse = await client.auth.socialLogin("google", {
32
+ idToken,
33
+ internalId
34
+ });
35
+ onSuccess?.(loginResponse);
36
+ } catch (error) {
37
+ onError?.(parseSignInError(error).error);
38
+ } finally {
39
+ setIsLoading(false);
40
+ }
41
+ }, [client, internalId, onError, onSuccess]);
42
+ const handleGoogleSignIn = React.useCallback(() => {
43
+ try {
44
+ startGoogleSignIn({
45
+ clientId: googleWebClientId,
46
+ redirectUri: googleRedirectUri
47
+ });
48
+ } catch (error) {
49
+ onError?.(parseSignInError(error).error);
50
+ }
51
+ }, [googleRedirectUri, googleWebClientId, onError]);
52
+ React.useEffect(() => {
53
+ const idToken = takeGoogleIdToken();
54
+ if (idToken) {
55
+ void signInWithIdToken(idToken);
56
+ }
57
+ }, [signInWithIdToken]);
58
+ return /*#__PURE__*/_jsx(SocialLoginButton, {
59
+ ...props,
60
+ backgroundColor: theme.dark ? "#000" : "#fff",
61
+ style: style,
62
+ disabled: isLoading || disabled,
63
+ onPress: handleGoogleSignIn,
64
+ testID: testID,
65
+ children: children
66
+ });
67
+ };
68
+ //# sourceMappingURL=google-login-button.web.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["useOvok","React","useAppTheme","parseSignInError","startGoogleSignIn","takeGoogleIdToken","SocialLoginButton","jsx","_jsx","GoogleLoginButton","googleIosClientId","_googleIosClientId","googleWebClientId","googleRedirectUri","internalId","onSuccess","onError","testID","style","disabled","children","props","theme","client","isLoading","setIsLoading","useState","signInWithIdToken","useCallback","idToken","loginResponse","auth","socialLogin","error","handleGoogleSignIn","clientId","redirectUri","useEffect","backgroundColor","dark","onPress"],"sourceRoot":"../../../../../../../src","sources":["modules/auth/sign-in/components/social-logins/google-login-button.web.tsx"],"mappings":";;AAAA,SAASA,OAAO,QAAQ,uBAAuB;AAC/C,OAAO,KAAKC,KAAK,MAAM,OAAO;AAE9B,SAASC,WAAW,QAAQ,4BAAmB;AAC/C,SAASC,gBAAgB,QAAQ,iCAA8B;AAE/D,SACEC,iBAAiB,EACjBC,iBAAiB,QACZ,wCAAqC;AAE5C,SAASC,iBAAiB,QAAQ,0BAAuB;;AAEzD;AAAA,SAAAC,GAAA,IAAAC,IAAA;AACA,OAAO,MAAMC,iBAAiB,GAAGA,CAAC;EAChCC,iBAAiB,EAAEC,kBAAkB;EACrCC,iBAAiB;EACjBC,iBAAiB;EACjBC,UAAU;EACVC,SAAS;EACTC,OAAO;EACPC,MAAM;EACNC,KAAK;EACLC,QAAQ;EACRC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AACE,OAAO,CAAC;IACjC;EACF,CAAC,EAAE,CAACF,iBAAiB,CAAC,CAAC;EAEvB,oBACEnB,IAAA,CAACF,iBAAiB;IAAA,GACZe,KAAK;IACTiB,eAAe,EAAEhB,KAAK,CAACiB,IAAI,GAAG,MAAM,GAAG,MAAO;IAC9CrB,KAAK,EAAEA,KAAM;IACbC,QAAQ,EAAEK,SAAS,IAAIL,QAAS;IAChCqB,OAAO,EAAEN,kBAAmB;IAC5BjB,MAAM,EAAEA,MAAO;IAAAG,QAAA,EAEdA;EAAQ,CACQ,CAAC;AAExB,CAAC","ignoreList":[]}
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
 
3
3
  import { GoogleIcon } from "./google-icon.js";
4
- import { GoogleLoginButton } from "./google-login-button.js";
4
+ import { GoogleLoginButton } from "./google-login-button";
5
5
  import { GoogleLoginText } from "./google-login-text.js";
6
6
 
7
7
  /**
@@ -1 +1 @@
1
- {"version":3,"names":["GoogleIcon","GoogleLoginButton","GoogleLoginText","GoogleLogin","Object","assign","Icon","Text"],"sourceRoot":"../../../../../../../src","sources":["modules/auth/sign-in/components/social-logins/google-login.tsx"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,kBAAe;AAC1C,SAASC,iBAAiB,QAAQ,0BAAuB;AACzD,SAASC,eAAe,QAAQ,wBAAqB;;AAErD;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,WAAW,GAAGC,MAAM,CAACC,MAAM,CAACJ,iBAAiB,EAAE;EAC1D;EACAK,IAAI,EAAEN,UAAU;EAEhB;EACAO,IAAI,EAAEL;AACR,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["GoogleIcon","GoogleLoginButton","GoogleLoginText","GoogleLogin","Object","assign","Icon","Text"],"sourceRoot":"../../../../../../../src","sources":["modules/auth/sign-in/components/social-logins/google-login.tsx"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,kBAAe;AAC1C,SAASC,iBAAiB,QAAQ,uBAAuB;AACzD,SAASC,eAAe,QAAQ,wBAAqB;;AAErD;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,WAAW,GAAGC,MAAM,CAACC,MAAM,CAACJ,iBAAiB,EAAE;EAC1D;EACAK,IAAI,EAAEN,UAAU;EAEhB;EACAO,IAAI,EAAEL;AACR,CAAC,CAAC","ignoreList":[]}
@@ -9,5 +9,7 @@ export * from "./types/spacing-props.js";
9
9
  export * from "./types/signin-form-forgot-password-props.js";
10
10
  export * from "./types/login-with-separator-props.js";
11
11
  export * from "./types/social-logins-props.js";
12
+ export * from "./types/google-login-props.js";
13
+ export * from "./types/apple-login-props.js";
12
14
  export * from "./types/footer-props.js";
13
15
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["SignIn"],"sourceRoot":"../../../../../src","sources":["modules/auth/sign-in/index.tsx"],"mappings":";;AAAA,SAASA,MAAM,QAAQ,yBAAsB;AAE7C,cAAc,0BAAuB;AACrC,cAAc,iCAA8B;AAC5C,cAAc,6BAA0B;AACxC,cAAc,gCAA6B;AAC3C,cAAc,0BAAuB;AACrC,cAAc,8CAA2C;AACzD,cAAc,uCAAoC;AAClD,cAAc,gCAA6B;AAC3C,cAAc,yBAAsB","ignoreList":[]}
1
+ {"version":3,"names":["SignIn"],"sourceRoot":"../../../../../src","sources":["modules/auth/sign-in/index.tsx"],"mappings":";;AAAA,SAASA,MAAM,QAAQ,yBAAsB;AAE7C,cAAc,0BAAuB;AACrC,cAAc,iCAA8B;AAC5C,cAAc,6BAA0B;AACxC,cAAc,gCAA6B;AAC3C,cAAc,0BAAuB;AACrC,cAAc,8CAA2C;AACzD,cAAc,uCAAoC;AAClD,cAAc,gCAA6B;AAC3C,cAAc,+BAA4B;AAC1C,cAAc,8BAA2B;AACzC,cAAc,yBAAsB","ignoreList":[]}
@@ -0,0 +1,84 @@
1
+ "use strict";
2
+
3
+ import { jwtClaims } from "./jwt-claims.js";
4
+ const APPLE_SCRIPT_URL = "https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js";
5
+ const APPLE_CANCEL_ERRORS = new Set(["popup_closed_by_user", "user_cancelled_authorize"]);
6
+ const APPLE_REAL_USER_STATUS_UNKNOWN = 1;
7
+
8
+ /** The Apple credentials Ovok takes, without the `internalId` of the sign-in entry. */
9
+
10
+ /** The Services ID Apple signs the user in for, and the return URL registered for it. */
11
+
12
+ const browser = () => globalThis;
13
+ let appleScript;
14
+
15
+ /** Loads Sign in with Apple JS once; a failed load is tried again on the next call. */
16
+ const loadAppleScript = () => {
17
+ appleScript ??= new Promise((resolve, reject) => {
18
+ const {
19
+ document
20
+ } = browser();
21
+ const script = document.createElement("script");
22
+ script.src = APPLE_SCRIPT_URL;
23
+ script.async = true;
24
+ script.onload = () => resolve();
25
+ script.onerror = () => {
26
+ appleScript = undefined;
27
+ reject(new Error("Sign in with Apple could not be loaded"));
28
+ };
29
+ document.head.append(script);
30
+ });
31
+ return appleScript;
32
+ };
33
+ const appleId = () => {
34
+ const {
35
+ AppleID
36
+ } = browser();
37
+ if (!AppleID) {
38
+ throw new Error("Sign in with Apple is not available");
39
+ }
40
+ return AppleID;
41
+ };
42
+
43
+ // Apple sends the name only the first time the user signs in.
44
+ const appleFullName = name => name ? {
45
+ givenName: name.firstName ?? null,
46
+ familyName: name.lastName ?? null,
47
+ middleName: null,
48
+ namePrefix: null,
49
+ nameSuffix: null,
50
+ nickname: null
51
+ } : null;
52
+ const appleCredentials = ({
53
+ authorization,
54
+ user
55
+ }) => ({
56
+ identityToken: authorization.id_token,
57
+ authorizationCode: authorization.code,
58
+ state: authorization.state ?? null,
59
+ user: jwtClaims(authorization.id_token).sub ?? "",
60
+ email: user?.email ?? "",
61
+ fullName: appleFullName(user?.name),
62
+ realUserStatus: APPLE_REAL_USER_STATUS_UNKNOWN
63
+ });
64
+
65
+ /** Opens Apple's sign-in popup; it must run from a user gesture such as a tap. */
66
+ const signInWithApple = async ({
67
+ servicesId,
68
+ redirectUri
69
+ }) => {
70
+ await loadAppleScript();
71
+ const apple = appleId();
72
+ apple.auth.init({
73
+ clientId: servicesId,
74
+ scope: "name email",
75
+ redirectURI: redirectUri ?? browser().location.origin,
76
+ usePopup: true
77
+ });
78
+ return appleCredentials(await apple.auth.signIn());
79
+ };
80
+
81
+ /** Whether the user closed Apple's popup or declined, which is not an error to report. */
82
+ const isAppleCancel = cause => typeof cause === "object" && cause !== null && APPLE_CANCEL_ERRORS.has(cause.error ?? "");
83
+ export { isAppleCancel, loadAppleScript, signInWithApple };
84
+ //# sourceMappingURL=apple-web-sign-in.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["jwtClaims","APPLE_SCRIPT_URL","APPLE_CANCEL_ERRORS","Set","APPLE_REAL_USER_STATUS_UNKNOWN","browser","globalThis","appleScript","loadAppleScript","Promise","resolve","reject","document","script","createElement","src","async","onload","onerror","undefined","Error","head","append","appleId","AppleID","appleFullName","name","givenName","firstName","familyName","lastName","middleName","namePrefix","nameSuffix","nickname","appleCredentials","authorization","user","identityToken","id_token","authorizationCode","code","state","sub","email","fullName","realUserStatus","signInWithApple","servicesId","redirectUri","apple","auth","init","clientId","scope","redirectURI","location","origin","usePopup","signIn","isAppleCancel","cause","has","error"],"sourceRoot":"../../../../../../src","sources":["modules/auth/sign-in/utils/apple-web-sign-in.ts"],"mappings":";;AAEA,SAASA,SAAS,QAAQ,iBAAc;AAExC,MAAMC,gBAAgB,GACpB,sFAAsF;AAExF,MAAMC,mBAAmB,GAAG,IAAIC,GAAG,CAAC,CAAC,sBAAsB,EAAE,0BAA0B,CAAC,CAAC;AACzF,MAAMC,8BAA8B,GAAG,CAAC;;AAExC;;AAGA;;AAsCA,MAAMC,OAAO,GAAGA,CAAA,KAAMC,UAAuC;AAE7D,IAAIC,WAAsC;;AAE1C;AACA,MAAMC,eAAe,GAAGA,CAAA,KAAqB;EAC3CD,WAAW,KAAK,IAAIE,OAAO,CAAO,CAACC,OAAO,EAAEC,MAAM,KAAK;IACrD,MAAM;MAAEC;IAAS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,CAAC,CAACI,GAAG,IAAI,EAAE;EACjDC,KAAK,EAAEP,IAAI,EAAEO,KAAK,IAAI,EAAE;EACxBC,QAAQ,EAAEpB,aAAa,CAACY,IAAI,EAAEX,IAAI,CAAC;EACnCoB,cAAc,EAAE1C;AAClB,CAAC,CAAC;;AAEF;AACA,MAAM2C,eAAe,GAAG,MAAAA,CAAO;EAC7BC,UAAU;EACVC;AACe,CAAC,KAAmC;EACnD,MAAMzC,eAAe,CAAC,CAAC;EAEvB,MAAM0C,KAAK,GAAG3B,OAAO,CAAC,CAAC;EAEvB2B,KAAK,CAACC,IAAI,CAACC,IAAI,CAAC;IACdC,QAAQ,EAAEL,UAAU;IACpBM,KAAK,EAAE,YAAY;IACnBC,WAAW,EAAEN,WAAW,IAAI5C,OAAO,CAAC,CAAC,CAACmD,QAAQ,CAACC,MAAM;IACrDC,QAAQ,EAAE;EACZ,CAAC,CAAC;EAEF,OAAOvB,gBAAgB,CAAC,MAAMe,KAAK,CAACC,IAAI,CAACQ,MAAM,CAAC,CAAC,CAAC;AACpD,CAAC;;AAED;AACA,MAAMC,aAAa,GAAIC,KAAc,IACnC,OAAOA,KAAK,KAAK,QAAQ,IACzBA,KAAK,KAAK,IAAI,IACd3D,mBAAmB,CAAC4D,GAAG,CAAED,KAAK,CAAwBE,KAAK,IAAI,EAAE,CAAC;AAEpE,SACEH,aAAa,EACbpD,eAAe,EACfuC,eAAe","ignoreList":[]}
@@ -0,0 +1,84 @@
1
+ "use strict";
2
+
3
+ import { jwtClaims } from "./jwt-claims.js";
4
+ const GOOGLE_AUTHORIZE_URL = "https://accounts.google.com/o/oauth2/v2/auth";
5
+ const GOOGLE_RETURN_PATH = "/oauth/google.html";
6
+ const GOOGLE_REQUEST_KEY = "ovok.google-sign-in";
7
+ const GOOGLE_ANSWER_KEY = "ovok.google-sign-in.answer";
8
+
9
+ /** What this tab asked Google for, kept until the answer comes back. */
10
+
11
+ /** Where the tab goes for the ID token, and which address Google returns it to. */
12
+
13
+ const browser = () => globalThis;
14
+ const authorizeUrl = ({
15
+ clientId,
16
+ redirectUri
17
+ }, {
18
+ state,
19
+ nonce
20
+ }) => {
21
+ const query = new URLSearchParams({
22
+ client_id: clientId,
23
+ redirect_uri: redirectUri,
24
+ response_type: "id_token",
25
+ scope: "openid email profile",
26
+ prompt: "select_account",
27
+ state,
28
+ nonce
29
+ });
30
+ return `${GOOGLE_AUTHORIZE_URL}?${query.toString()}`;
31
+ };
32
+
33
+ /** Sends this tab to Google's sign-in page, remembering the request its answer must match. */
34
+ const startGoogleSignIn = ({
35
+ clientId,
36
+ redirectUri
37
+ }) => {
38
+ const {
39
+ sessionStorage,
40
+ location,
41
+ crypto
42
+ } = browser();
43
+ const request = {
44
+ state: crypto.randomUUID(),
45
+ nonce: crypto.randomUUID(),
46
+ returnTo: `${location.pathname}${location.search}`
47
+ };
48
+ sessionStorage.setItem(GOOGLE_REQUEST_KEY, JSON.stringify(request));
49
+ location.assign(authorizeUrl({
50
+ clientId,
51
+ redirectUri: redirectUri ?? `${location.origin}${GOOGLE_RETURN_PATH}`
52
+ }, request));
53
+ };
54
+ const parseRequest = stored => {
55
+ try {
56
+ return JSON.parse(stored ?? "null") ?? undefined;
57
+ } catch {
58
+ return undefined;
59
+ }
60
+ };
61
+ const answeredIdToken = (answer, request) => {
62
+ const idToken = answer.get("id_token");
63
+ if (!request || !idToken || answer.get("state") !== request.state) {
64
+ return undefined;
65
+ }
66
+ return jwtClaims(idToken).nonce === request.nonce ? idToken : undefined;
67
+ };
68
+
69
+ /** The ID token Google sent back for this tab's own request; the request and the answer are forgotten either way. */
70
+ const takeGoogleIdToken = () => {
71
+ const {
72
+ sessionStorage
73
+ } = browser();
74
+ const answer = sessionStorage.getItem(GOOGLE_ANSWER_KEY);
75
+ if (answer === null) {
76
+ return undefined;
77
+ }
78
+ const request = parseRequest(sessionStorage.getItem(GOOGLE_REQUEST_KEY));
79
+ sessionStorage.removeItem(GOOGLE_ANSWER_KEY);
80
+ sessionStorage.removeItem(GOOGLE_REQUEST_KEY);
81
+ return answeredIdToken(new URLSearchParams(answer), request);
82
+ };
83
+ export { GOOGLE_ANSWER_KEY, GOOGLE_REQUEST_KEY, startGoogleSignIn, takeGoogleIdToken };
84
+ //# sourceMappingURL=google-redirect-sign-in.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["jwtClaims","GOOGLE_AUTHORIZE_URL","GOOGLE_RETURN_PATH","GOOGLE_REQUEST_KEY","GOOGLE_ANSWER_KEY","browser","globalThis","authorizeUrl","clientId","redirectUri","state","nonce","query","URLSearchParams","client_id","redirect_uri","response_type","scope","prompt","toString","startGoogleSignIn","sessionStorage","location","crypto","request","randomUUID","returnTo","pathname","search","setItem","JSON","stringify","assign","origin","parseRequest","stored","parse","undefined","answeredIdToken","answer","idToken","get","takeGoogleIdToken","getItem","removeItem"],"sourceRoot":"../../../../../../src","sources":["modules/auth/sign-in/utils/google-redirect-sign-in.ts"],"mappings":";;AAAA,SAASA,SAAS,QAAQ,iBAAc;AAExC,MAAMC,oBAAoB,GAAG,8CAA8C;AAC3E,MAAMC,kBAAkB,GAAG,oBAAoB;AAC/C,MAAMC,kBAAkB,GAAG,qBAAqB;AAChD,MAAMC,iBAAiB,GAAG,4BAA4B;;AAEtD;;AASA;;AAuBA,MAAMC,OAAO,GAAGA,CAAA,KAAMC,UAAuC;AAE7D,MAAMC,YAAY,GAAGA,CACnB;EAAEC,QAAQ;EAAEC;AAA6C,CAAC,EAC1D;EAAEC,KAAK;EAAEC;AAAqB,CAAC,KAC5B;EACH,MAAMC,KAAK,GAAG,IAAIC,eAAe,CAAC;IAChCC,SAAS,EAAEN,QAAQ;IACnBO,YAAY,EAAEN,WAAW;IACzBO,aAAa,EAAE,UAAU;IACzBC,KAAK,EAAE,sBAAsB;IAC7BC,MAAM,EAAE,gBAAgB;IACxBR,KAAK;IACLC;EACF,CAAC,CAAC;EAEF,OAAO,GAAGV,oBAAoB,IAAIW,KAAK,CAACO,QAAQ,CAAC,CAAC,E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GAAGH,SAAS;AACzE,CAAC;;AAED;AACA,MAAMK,iBAAiB,GAAGA,CAAA,KAA0B;EAClD,MAAM;IAAErB;EAAe,CAAC,GAAGhB,OAAO,CAAC,CAAC;EACpC,MAAMkC,MAAM,GAAGlB,cAAc,CAACsB,OAAO,CAACvC,iBAAiB,CAAC;EAExD,IAAImC,MAAM,KAAK,IAAI,EAAE;IACnB,OAAOF,SAAS;EAClB;EAEA,MAAMb,OAAO,GAAGU,YAAY,CAACb,cAAc,CAACsB,OAAO,CAACxC,kBAAkB,CAAC,CAAC;EAExEkB,cAAc,CAACuB,UAAU,CAACxC,iBAAiB,CAAC;EAC5CiB,cAAc,CAACuB,UAAU,CAACzC,kBAAkB,CAAC;EAE7C,OAAOmC,eAAe,CAAC,IAAIzB,eAAe,CAAC0B,MAAM,CAAC,EAAEf,OAAO,CAAC;AAC9D,CAAC;AAED,SACEpB,iBAAiB,EACjBD,kBAAkB,EAClBiB,iBAAiB,EACjBsB,iBAAiB","ignoreList":[]}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ /** The claims web sign-in reads from a provider's JWT. */
4
+
5
+ const asClaims = value => typeof value === "object" && value !== null ? value : {};
6
+
7
+ /** A JWT's claims, read without checking the signature; Ovok verifies the token itself. */
8
+ const jwtClaims = jwt => {
9
+ try {
10
+ const payload = (jwt.split(".")[1] ?? "").replace(/-/g, "+").replace(/_/g, "/");
11
+ return asClaims(JSON.parse(atob(payload)));
12
+ } catch {
13
+ return {};
14
+ }
15
+ };
16
+ export { jwtClaims };
17
+ //# sourceMappingURL=jwt-claims.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["asClaims","value","jwtClaims","jwt","payload","split","replace","JSON","parse","atob"],"sourceRoot":"../../../../../../src","sources":["modules/auth/sign-in/utils/jwt-claims.ts"],"mappings":";;AAAA;;AAMA,MAAMA,QAAQ,GAAIC,KAAc,IAC9B,OAAOA,KAAK,KAAK,QAAQ,IAAIA,KAAK,KAAK,IAAI,GAAIA,KAAK,GAAiB,CAAC,CAAC;;AAEzE;AACA,MAAMC,SAAS,GAAIC,GAAW,IAAgB;EAC5C,IAAI;IACF,MAAMC,OAAO,GAAG,CAACD,GAAG,CAACE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,EAAEC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAACA,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC;IAE/E,OAAON,QAAQ,CAACO,IAAI,CAACC,KAAK,CAACC,IAAI,CAACL,OAAO,CAAC,CAAC,CAAC;EAC5C,CAAC,CAAC,MAAM;IACN,OAAO,CAAC,CAAC;EACX;AACF,CAAC;AAED,SAASF,SAAS","ignoreList":[]}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ /** The web keeps no Google account in the app, so there is nothing to clear. */
4
+ export const signOutGoogleIfNeeded = async () => undefined;
5
+ //# sourceMappingURL=sign-out-google.web.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["signOutGoogleIfNeeded","undefined"],"sourceRoot":"../../../../../src","sources":["modules/auth/utils/sign-out-google.web.ts"],"mappings":";;AAAA;AACA,OAAO,MAAMA,qBAAqB,GAAG,MAAAA,CAAA,KAA2BC,SAAS","ignoreList":[]}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * The page Google returns to when `GoogleLogin` signs in on the web.
3
+ *
4
+ * Serve it as a static file at the redirect URI, by default `/oauth/google.html`. It keeps Google's answer
5
+ * for this tab and sends the tab back to the sign-in screen, so the token never stays in the address.
6
+ */
7
+ export declare const GOOGLE_RETURN_PAGE_HTML: string;
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/auth/google-return-page/index.ts"],"names":[],"mappings":"AAKA;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,EAAE,MASrC,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { SocialSignInOptions } from "./use-social-sign-in";
2
+ import type { Session } from "@ovok/core/next";
3
+ /** Rejects: the web signs in through the `SignIn.SocialLogins` buttons, which leave and return to the page. */
4
+ export declare const useSocialSignIn: (_options: SocialSignInOptions) => Omit<import("./use-auth-action").AuthActionState<Session>, "run"> & {
5
+ run: () => Promise<Session>;
6
+ };
7
+ //# sourceMappingURL=use-social-sign-in.web.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-social-sign-in.web.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/auth/hooks/use-social-sign-in.web.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAO/C,+GAA+G;AAC/G,eAAO,MAAM,eAAe,GAAI,UAAU,mBAAmB;;CAGzD,CAAC"}
@@ -7,6 +7,7 @@
7
7
  */
8
8
  import "./default-translation";
9
9
  export * from "./sign-in";
10
+ export * from "./google-return-page";
10
11
  export * from "./register";
11
12
  export * from "./profile";
12
13
  export * from "./delete-account-button";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/auth/index.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,uBAAuB,CAAC;AAE/B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iCAAiC,CAAC;AAChD,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC;AACrC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/auth/index.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,uBAAuB,CAAC;AAE/B,cAAc,WAAW,CAAC;AAC1B,cAAc,sBAAsB,CAAC;AACrC,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iCAAiC,CAAC;AAChD,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC;AACrC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,WAAW,CAAC"}
@@ -28,13 +28,13 @@ export declare const Register: {
28
28
  /** Container for the social sign-up buttons. */
29
29
  SocialLogins: {
30
30
  ({ children, style, testID, }: React.PropsWithChildren<import("../..").SocialLoginsProps>): import("react").JSX.Element;
31
- GoogleLogin: (({ googleIosClientId, googleWebClientId, internalId, onSuccess, onError, testID, style, disabled, children, ...props }: React.PropsWithChildren<import("../../sign-in/types/google-login-props").GoogleLoginProps>) => import("react").JSX.Element) & {
31
+ GoogleLogin: (({ googleIosClientId, googleWebClientId, internalId, onSuccess, onError, testID, style, disabled, children, ...props }: React.PropsWithChildren<import("../..").GoogleLoginProps>) => import("react").JSX.Element) & {
32
32
  Icon: import("react").FC<import("../../sign-in/types/google-icon-props").GoogleIconProps>;
33
33
  Text: <TVariant extends import("react-native-paper").MD3TypescaleKey>({ children, style, testID, ...props }: Omit<import("react-native-paper").TextProps<TVariant>, "children"> & {
34
34
  children?: React.ReactNode;
35
35
  }) => import("react").JSX.Element;
36
36
  };
37
- AppleLogin: (({ testID, internalId, onSuccess, onError, style, disabled, children, ...props }: React.PropsWithChildren<import("../../sign-in/types/apple-login-props").AppleLoginProps>) => import("react").JSX.Element | null) & {
37
+ AppleLogin: (({ testID, internalId, onSuccess, onError, style, disabled, children, ...props }: React.PropsWithChildren<import("../..").AppleLoginProps>) => import("react").JSX.Element | null) & {
38
38
  Icon: ({ size, color, style, ...props }: import("iconsax-react-nativejs").IconProps) => import("react").JSX.Element;
39
39
  Text: <TVariant extends import("react-native-paper").MD3TypescaleKey>({ children, style, testID, ...props }: Omit<import("react-native-paper").TextProps<TVariant>, "children"> & {
40
40
  children?: React.ReactNode;
@@ -33,13 +33,13 @@ export declare const SignIn: {
33
33
  /** Container for the social sign-in buttons. */
34
34
  SocialLogins: {
35
35
  ({ children, style, testID, }: React.PropsWithChildren<import("..").SocialLoginsProps>): import("react").JSX.Element;
36
- GoogleLogin: (({ googleIosClientId, googleWebClientId, internalId, onSuccess, onError, testID, style, disabled, children, ...props }: React.PropsWithChildren<import("../types/google-login-props").GoogleLoginProps>) => import("react").JSX.Element) & {
36
+ GoogleLogin: (({ googleIosClientId, googleWebClientId, internalId, onSuccess, onError, testID, style, disabled, children, ...props }: React.PropsWithChildren<import("..").GoogleLoginProps>) => import("react").JSX.Element) & {
37
37
  Icon: import("react").FC<import("../types/google-icon-props").GoogleIconProps>;
38
38
  Text: <TVariant extends import("react-native-paper").MD3TypescaleKey>({ children, style, testID, ...props }: Omit<import("react-native-paper").TextProps<TVariant>, "children"> & {
39
39
  children?: React.ReactNode;
40
40
  }) => import("react").JSX.Element;
41
41
  };
42
- AppleLogin: (({ testID, internalId, onSuccess, onError, style, disabled, children, ...props }: React.PropsWithChildren<import("../types/apple-login-props").AppleLoginProps>) => import("react").JSX.Element | null) & {
42
+ AppleLogin: (({ testID, internalId, onSuccess, onError, style, disabled, children, ...props }: React.PropsWithChildren<import("..").AppleLoginProps>) => import("react").JSX.Element | null) & {
43
43
  Icon: ({ size, color, style, ...props }: import("iconsax-react-nativejs").IconProps) => import("react").JSX.Element;
44
44
  Text: <TVariant extends import("react-native-paper").MD3TypescaleKey>({ children, style, testID, ...props }: Omit<import("react-native-paper").TextProps<TVariant>, "children"> & {
45
45
  children?: React.ReactNode;