@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.
- package/lib/commonjs/modules/auth/google-return-page/index.js +24 -0
- package/lib/commonjs/modules/auth/google-return-page/index.js.map +1 -0
- package/lib/commonjs/modules/auth/hooks/use-social-sign-in.web.js +15 -0
- package/lib/commonjs/modules/auth/hooks/use-social-sign-in.web.js.map +1 -0
- package/lib/commonjs/modules/auth/index.js +21 -10
- package/lib/commonjs/modules/auth/index.js.map +1 -1
- package/lib/commonjs/modules/auth/session/logout-session.js +1 -1
- package/lib/commonjs/modules/auth/sign-in/components/social-logins/apple-login-button.web.js +73 -0
- package/lib/commonjs/modules/auth/sign-in/components/social-logins/apple-login-button.web.js.map +1 -0
- package/lib/commonjs/modules/auth/sign-in/components/social-logins/apple-login.js +1 -1
- package/lib/commonjs/modules/auth/sign-in/components/social-logins/google-login-button.web.js +73 -0
- package/lib/commonjs/modules/auth/sign-in/components/social-logins/google-login-button.web.js.map +1 -0
- package/lib/commonjs/modules/auth/sign-in/components/social-logins/google-login.js +1 -1
- package/lib/commonjs/modules/auth/sign-in/index.js +24 -0
- package/lib/commonjs/modules/auth/sign-in/index.js.map +1 -1
- package/lib/commonjs/modules/auth/sign-in/utils/apple-web-sign-in.js +90 -0
- package/lib/commonjs/modules/auth/sign-in/utils/apple-web-sign-in.js.map +1 -0
- package/lib/commonjs/modules/auth/sign-in/utils/google-redirect-sign-in.js +89 -0
- package/lib/commonjs/modules/auth/sign-in/utils/google-redirect-sign-in.js.map +1 -0
- package/lib/commonjs/modules/auth/sign-in/utils/jwt-claims.js +21 -0
- package/lib/commonjs/modules/auth/sign-in/utils/jwt-claims.js.map +1 -0
- package/lib/commonjs/modules/auth/utils/sign-out-google.web.js +10 -0
- package/lib/commonjs/modules/auth/utils/sign-out-google.web.js.map +1 -0
- package/lib/module/modules/auth/google-return-page/index.js +21 -0
- package/lib/module/modules/auth/google-return-page/index.js.map +1 -0
- package/lib/module/modules/auth/hooks/use-social-sign-in.web.js +10 -0
- package/lib/module/modules/auth/hooks/use-social-sign-in.web.js.map +1 -0
- package/lib/module/modules/auth/index.js +2 -1
- package/lib/module/modules/auth/index.js.map +1 -1
- package/lib/module/modules/auth/session/logout-session.js +1 -1
- package/lib/module/modules/auth/session/logout-session.js.map +1 -1
- package/lib/module/modules/auth/sign-in/components/social-logins/apple-login-button.web.js +67 -0
- package/lib/module/modules/auth/sign-in/components/social-logins/apple-login-button.web.js.map +1 -0
- package/lib/module/modules/auth/sign-in/components/social-logins/apple-login.js +1 -1
- package/lib/module/modules/auth/sign-in/components/social-logins/apple-login.js.map +1 -1
- package/lib/module/modules/auth/sign-in/components/social-logins/google-login-button.web.js +68 -0
- package/lib/module/modules/auth/sign-in/components/social-logins/google-login-button.web.js.map +1 -0
- package/lib/module/modules/auth/sign-in/components/social-logins/google-login.js +1 -1
- package/lib/module/modules/auth/sign-in/components/social-logins/google-login.js.map +1 -1
- package/lib/module/modules/auth/sign-in/index.js +2 -0
- package/lib/module/modules/auth/sign-in/index.js.map +1 -1
- package/lib/module/modules/auth/sign-in/utils/apple-web-sign-in.js +84 -0
- package/lib/module/modules/auth/sign-in/utils/apple-web-sign-in.js.map +1 -0
- package/lib/module/modules/auth/sign-in/utils/google-redirect-sign-in.js +84 -0
- package/lib/module/modules/auth/sign-in/utils/google-redirect-sign-in.js.map +1 -0
- package/lib/module/modules/auth/sign-in/utils/jwt-claims.js +17 -0
- package/lib/module/modules/auth/sign-in/utils/jwt-claims.js.map +1 -0
- package/lib/module/modules/auth/utils/sign-out-google.web.js +5 -0
- package/lib/module/modules/auth/utils/sign-out-google.web.js.map +1 -0
- package/lib/typescript/commonjs/src/modules/auth/google-return-page/index.d.ts +8 -0
- package/lib/typescript/commonjs/src/modules/auth/google-return-page/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/auth/hooks/use-social-sign-in.web.d.ts +7 -0
- package/lib/typescript/commonjs/src/modules/auth/hooks/use-social-sign-in.web.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/auth/index.d.ts +1 -0
- package/lib/typescript/commonjs/src/modules/auth/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/register/components/register.d.ts +2 -2
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/sign-in.d.ts +2 -2
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/social-logins/apple-login-button.web.d.ts +5 -0
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/social-logins/apple-login-button.web.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/social-logins/apple-login.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/social-logins/google-login-button.web.d.ts +5 -0
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/social-logins/google-login-button.web.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/social-logins/google-login.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/social-logins/social-logins.d.ts +2 -2
- package/lib/typescript/commonjs/src/modules/auth/sign-in/index.d.ts +2 -0
- package/lib/typescript/commonjs/src/modules/auth/sign-in/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/sign-in/types/apple-login-props.d.ts +13 -0
- package/lib/typescript/commonjs/src/modules/auth/sign-in/types/apple-login-props.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/sign-in/types/google-login-props.d.ts +13 -0
- package/lib/typescript/commonjs/src/modules/auth/sign-in/types/google-login-props.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/sign-in/utils/apple-web-sign-in.d.ts +17 -0
- package/lib/typescript/commonjs/src/modules/auth/sign-in/utils/apple-web-sign-in.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/auth/sign-in/utils/google-redirect-sign-in.d.ts +14 -0
- package/lib/typescript/commonjs/src/modules/auth/sign-in/utils/google-redirect-sign-in.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/auth/sign-in/utils/jwt-claims.d.ts +9 -0
- package/lib/typescript/commonjs/src/modules/auth/sign-in/utils/jwt-claims.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/auth/utils/sign-out-google.web.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/auth/utils/sign-out-google.web.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/auth/google-return-page/index.d.ts +8 -0
- package/lib/typescript/module/src/modules/auth/google-return-page/index.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/auth/hooks/use-social-sign-in.web.d.ts +7 -0
- package/lib/typescript/module/src/modules/auth/hooks/use-social-sign-in.web.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/auth/index.d.ts +1 -0
- package/lib/typescript/module/src/modules/auth/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/register/components/register.d.ts +2 -2
- package/lib/typescript/module/src/modules/auth/sign-in/components/sign-in.d.ts +2 -2
- package/lib/typescript/module/src/modules/auth/sign-in/components/social-logins/apple-login-button.web.d.ts +5 -0
- package/lib/typescript/module/src/modules/auth/sign-in/components/social-logins/apple-login-button.web.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/auth/sign-in/components/social-logins/apple-login.d.ts +1 -1
- package/lib/typescript/module/src/modules/auth/sign-in/components/social-logins/google-login-button.web.d.ts +5 -0
- package/lib/typescript/module/src/modules/auth/sign-in/components/social-logins/google-login-button.web.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/auth/sign-in/components/social-logins/google-login.d.ts +1 -1
- package/lib/typescript/module/src/modules/auth/sign-in/components/social-logins/social-logins.d.ts +2 -2
- package/lib/typescript/module/src/modules/auth/sign-in/index.d.ts +2 -0
- package/lib/typescript/module/src/modules/auth/sign-in/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/sign-in/types/apple-login-props.d.ts +13 -0
- package/lib/typescript/module/src/modules/auth/sign-in/types/apple-login-props.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/sign-in/types/google-login-props.d.ts +13 -0
- package/lib/typescript/module/src/modules/auth/sign-in/types/google-login-props.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/sign-in/utils/apple-web-sign-in.d.ts +17 -0
- package/lib/typescript/module/src/modules/auth/sign-in/utils/apple-web-sign-in.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/auth/sign-in/utils/google-redirect-sign-in.d.ts +14 -0
- package/lib/typescript/module/src/modules/auth/sign-in/utils/google-redirect-sign-in.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/auth/sign-in/utils/jwt-claims.d.ts +9 -0
- package/lib/typescript/module/src/modules/auth/sign-in/utils/jwt-claims.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/auth/utils/sign-out-google.web.d.ts +3 -0
- package/lib/typescript/module/src/modules/auth/utils/sign-out-google.web.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { AppleLoginProps } from "../../types/apple-login-props";
|
|
3
|
+
/** Sign in with Apple in a popup, for the Services ID registered for this site; renders nothing without one. */
|
|
4
|
+
export declare const AppleLoginButton: ({ appleServicesId, ...props }: React.PropsWithChildren<AppleLoginProps>) => React.JSX.Element | null;
|
|
5
|
+
//# sourceMappingURL=apple-login-button.web.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apple-login-button.web.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/auth/sign-in/components/social-logins/apple-login-button.web.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAqEhE,gHAAgH;AAChH,eAAO,MAAM,gBAAgB,GAAI,+BAG9B,KAAK,CAAC,iBAAiB,CAAC,eAAe,CAAC,6BAGjC,CAAC"}
|
package/lib/typescript/commonjs/src/modules/auth/sign-in/components/social-logins/apple-login.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @group Components
|
|
5
5
|
*/
|
|
6
|
-
export declare const AppleLogin: (({ testID, internalId, onSuccess, onError, style, disabled, children, ...props }: React.PropsWithChildren<import("
|
|
6
|
+
export declare const AppleLogin: (({ testID, internalId, onSuccess, onError, style, disabled, children, ...props }: React.PropsWithChildren<import("../..").AppleLoginProps>) => import("react").JSX.Element | null) & {
|
|
7
7
|
/** Apple icon. */
|
|
8
8
|
Icon: ({ size, color, style, ...props }: import("iconsax-react-nativejs").IconProps) => import("react").JSX.Element;
|
|
9
9
|
/** Button label. */
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { GoogleLoginProps } from "../../types/google-login-props";
|
|
3
|
+
/** Google's sign-in page in this tab; back on the sign-in screen, the ID token it sent signs the user in. */
|
|
4
|
+
export declare const GoogleLoginButton: ({ googleIosClientId: _googleIosClientId, googleWebClientId, googleRedirectUri, internalId, onSuccess, onError, testID, style, disabled, children, ...props }: React.PropsWithChildren<GoogleLoginProps>) => React.JSX.Element;
|
|
5
|
+
//# sourceMappingURL=google-login-button.web.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"google-login-button.web.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/auth/sign-in/components/social-logins/google-login-button.web.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAQlE,6GAA6G;AAC7G,eAAO,MAAM,iBAAiB,GAAI,8JAY/B,KAAK,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,sBAmD3C,CAAC"}
|
package/lib/typescript/commonjs/src/modules/auth/sign-in/components/social-logins/google-login.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @group Components
|
|
5
5
|
*/
|
|
6
|
-
export declare const GoogleLogin: (({ googleIosClientId, googleWebClientId, internalId, onSuccess, onError, testID, style, disabled, children, ...props }: React.PropsWithChildren<import("
|
|
6
|
+
export declare const GoogleLogin: (({ googleIosClientId, googleWebClientId, internalId, onSuccess, onError, testID, style, disabled, children, ...props }: React.PropsWithChildren<import("../..").GoogleLoginProps>) => import("react").JSX.Element) & {
|
|
7
7
|
/** Google icon. */
|
|
8
8
|
Icon: import("react").FC<import("../../types/google-icon-props").GoogleIconProps>;
|
|
9
9
|
/** Button label. */
|
package/lib/typescript/commonjs/src/modules/auth/sign-in/components/social-logins/social-logins.d.ts
CHANGED
|
@@ -8,14 +8,14 @@ import { SocialLoginsProps } from "../../types/social-logins-props";
|
|
|
8
8
|
export declare const SocialLogins: {
|
|
9
9
|
({ children, style, testID, }: React.PropsWithChildren<SocialLoginsProps>): React.JSX.Element;
|
|
10
10
|
/** Sign in with Google button. */
|
|
11
|
-
GoogleLogin: (({ googleIosClientId, googleWebClientId, internalId, onSuccess, onError, testID, style, disabled, children, ...props }: React.PropsWithChildren<import("
|
|
11
|
+
GoogleLogin: (({ googleIosClientId, googleWebClientId, internalId, onSuccess, onError, testID, style, disabled, children, ...props }: React.PropsWithChildren<import("../..").GoogleLoginProps>) => React.JSX.Element) & {
|
|
12
12
|
Icon: React.FC<import("../../types/google-icon-props").GoogleIconProps>;
|
|
13
13
|
Text: <TVariant extends import("react-native-paper").MD3TypescaleKey>({ children, style, testID, ...props }: Omit<import("react-native-paper").TextProps<TVariant>, "children"> & {
|
|
14
14
|
children?: React.ReactNode;
|
|
15
15
|
}) => React.JSX.Element;
|
|
16
16
|
};
|
|
17
17
|
/** Sign in with Apple button. */
|
|
18
|
-
AppleLogin: (({ testID, internalId, onSuccess, onError, style, disabled, children, ...props }: React.PropsWithChildren<import("
|
|
18
|
+
AppleLogin: (({ testID, internalId, onSuccess, onError, style, disabled, children, ...props }: React.PropsWithChildren<import("../..").AppleLoginProps>) => React.JSX.Element | null) & {
|
|
19
19
|
Icon: ({ size, color, style, ...props }: import("iconsax-react-nativejs").IconProps) => React.JSX.Element;
|
|
20
20
|
Text: <TVariant extends import("react-native-paper").MD3TypescaleKey>({ children, style, testID, ...props }: Omit<import("react-native-paper").TextProps<TVariant>, "children"> & {
|
|
21
21
|
children?: React.ReactNode;
|
|
@@ -7,5 +7,7 @@ export * from "./types/spacing-props";
|
|
|
7
7
|
export * from "./types/signin-form-forgot-password-props";
|
|
8
8
|
export * from "./types/login-with-separator-props";
|
|
9
9
|
export * from "./types/social-logins-props";
|
|
10
|
+
export * from "./types/google-login-props";
|
|
11
|
+
export * from "./types/apple-login-props";
|
|
10
12
|
export * from "./types/footer-props";
|
|
11
13
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/auth/sign-in/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE9C,cAAc,uBAAuB,CAAC;AACtC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,2CAA2C,CAAC;AAC1D,cAAc,oCAAoC,CAAC;AACnD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,sBAAsB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/auth/sign-in/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE9C,cAAc,uBAAuB,CAAC;AACtC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,2CAA2C,CAAC;AAC1D,cAAc,oCAAoC,CAAC;AACnD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC"}
|
|
@@ -1,10 +1,23 @@
|
|
|
1
1
|
import { TouchableOpacityProps } from "react-native";
|
|
2
2
|
import type { Session } from "@ovok/core/next";
|
|
3
|
+
/** Props of `SignIn.SocialLogins.AppleLogin`. */
|
|
3
4
|
export type AppleLoginProps = Omit<TouchableOpacityProps, "onPress" | "onPressIn" | "onPressOut" | "onLongPress" | "children"> & {
|
|
5
|
+
/** The `external-auth-internal-id` of the Apple entry on the ClientApplication; the web needs its own entry. */
|
|
4
6
|
internalId: string;
|
|
7
|
+
/** Web only: the Services ID Apple signs the user in for. Without it the button renders nothing on the web. */
|
|
8
|
+
appleServicesId?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Web only: a Return URL registered for the Services ID.
|
|
11
|
+
* Defaults to this site's origin.
|
|
12
|
+
*/
|
|
13
|
+
appleRedirectUri?: string;
|
|
14
|
+
/** Test identifier of the button. */
|
|
5
15
|
testID?: string;
|
|
16
|
+
/** Called with the session once the user has signed in. */
|
|
6
17
|
onSuccess?: (loginResponse: Session) => void;
|
|
18
|
+
/** Called when sign-in fails; a cancelled sign-in is not an error. */
|
|
7
19
|
onError?: (error: Error) => void;
|
|
20
|
+
/** Button content, usually `AppleLogin.Icon` and `AppleLogin.Text`. */
|
|
8
21
|
children: React.ReactNode;
|
|
9
22
|
};
|
|
10
23
|
//# sourceMappingURL=apple-login-props.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apple-login-props.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/auth/sign-in/types/apple-login-props.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAErD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAE/C,MAAM,MAAM,eAAe,GAAG,IAAI,CAChC,qBAAqB,EACrB,SAAS,GAAG,WAAW,GAAG,YAAY,GAAG,aAAa,GAAG,UAAU,CACpE,GAAG;
|
|
1
|
+
{"version":3,"file":"apple-login-props.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/auth/sign-in/types/apple-login-props.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAErD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAE/C,iDAAiD;AACjD,MAAM,MAAM,eAAe,GAAG,IAAI,CAChC,qBAAqB,EACrB,SAAS,GAAG,WAAW,GAAG,YAAY,GAAG,aAAa,GAAG,UAAU,CACpE,GAAG;IAEF,gHAAgH;IAChH,UAAU,EAAE,MAAM,CAAC;IAEnB,+GAA+G;IAC/G,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B,qCAAqC;IACrC,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,2DAA2D;IAC3D,SAAS,CAAC,EAAE,CAAC,aAAa,EAAE,OAAO,KAAK,IAAI,CAAC;IAE7C,sEAAsE;IACtE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IAEjC,uEAAuE;IACvE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC"}
|
|
@@ -1,12 +1,25 @@
|
|
|
1
1
|
import { TouchableOpacityProps } from "react-native";
|
|
2
2
|
import type { Session } from "@ovok/core/next";
|
|
3
|
+
/** Props of `SignIn.SocialLogins.GoogleLogin`. */
|
|
3
4
|
export type GoogleLoginProps = Omit<TouchableOpacityProps, "onPress" | "onPressIn" | "onPressOut" | "onLongPress" | "children"> & {
|
|
5
|
+
/** Google OAuth client ID for iOS; the web ignores it. */
|
|
4
6
|
googleIosClientId: string;
|
|
7
|
+
/** Google OAuth web client ID. On the web it is the client ID the sign-in page asks Google for. */
|
|
5
8
|
googleWebClientId: string;
|
|
9
|
+
/**
|
|
10
|
+
* Web only: the redirect URI Google returns to, which must be an Authorized redirect URI of the web client.
|
|
11
|
+
* Defaults to `/oauth/google.html` on this site, where the app serves `GOOGLE_RETURN_PAGE_HTML`.
|
|
12
|
+
*/
|
|
13
|
+
googleRedirectUri?: string;
|
|
14
|
+
/** The `external-auth-internal-id` of the Google entry on the ClientApplication. */
|
|
6
15
|
internalId: string;
|
|
16
|
+
/** Test identifier of the button. */
|
|
7
17
|
testID?: string;
|
|
18
|
+
/** Called with the session once the user has signed in. */
|
|
8
19
|
onSuccess?: (loginResponse: Session) => void;
|
|
20
|
+
/** Called when sign-in fails; a cancelled sign-in is not an error. */
|
|
9
21
|
onError?: (error: Error) => void;
|
|
22
|
+
/** Button content, usually `GoogleLogin.Icon` and `GoogleLogin.Text`. */
|
|
10
23
|
children: React.ReactNode;
|
|
11
24
|
};
|
|
12
25
|
//# sourceMappingURL=google-login-props.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"google-login-props.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/auth/sign-in/types/google-login-props.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAErD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAE/C,MAAM,MAAM,gBAAgB,GAAG,IAAI,CACjC,qBAAqB,EACrB,SAAS,GAAG,WAAW,GAAG,YAAY,GAAG,aAAa,GAAG,UAAU,CACpE,GAAG;
|
|
1
|
+
{"version":3,"file":"google-login-props.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/auth/sign-in/types/google-login-props.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAErD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAE/C,kDAAkD;AAClD,MAAM,MAAM,gBAAgB,GAAG,IAAI,CACjC,qBAAqB,EACrB,SAAS,GAAG,WAAW,GAAG,YAAY,GAAG,aAAa,GAAG,UAAU,CACpE,GAAG;IAEF,0DAA0D;IAC1D,iBAAiB,EAAE,MAAM,CAAC;IAE1B,mGAAmG;IACnG,iBAAiB,EAAE,MAAM,CAAC;IAE1B;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B,oFAAoF;IACpF,UAAU,EAAE,MAAM,CAAC;IAEnB,qCAAqC;IACrC,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,2DAA2D;IAC3D,SAAS,CAAC,EAAE,CAAC,aAAa,EAAE,OAAO,KAAK,IAAI,CAAC;IAE7C,sEAAsE;IACtE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IAEjC,yEAAyE;IACzE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { SocialCredentials } from "@ovok/core/next";
|
|
2
|
+
/** The Apple credentials Ovok takes, without the `internalId` of the sign-in entry. */
|
|
3
|
+
type AppleWebCredentials = Omit<SocialCredentials["apple"], "internalId">;
|
|
4
|
+
/** The Services ID Apple signs the user in for, and the return URL registered for it. */
|
|
5
|
+
type AppleWebOptions = {
|
|
6
|
+
servicesId: string;
|
|
7
|
+
/** Defaults to this site's origin. */
|
|
8
|
+
redirectUri?: string;
|
|
9
|
+
};
|
|
10
|
+
/** Loads Sign in with Apple JS once; a failed load is tried again on the next call. */
|
|
11
|
+
declare const loadAppleScript: () => Promise<void>;
|
|
12
|
+
/** Opens Apple's sign-in popup; it must run from a user gesture such as a tap. */
|
|
13
|
+
declare const signInWithApple: ({ servicesId, redirectUri, }: AppleWebOptions) => Promise<AppleWebCredentials>;
|
|
14
|
+
/** Whether the user closed Apple's popup or declined, which is not an error to report. */
|
|
15
|
+
declare const isAppleCancel: (cause: unknown) => boolean;
|
|
16
|
+
export { isAppleCancel, loadAppleScript, signInWithApple, type AppleWebCredentials, type AppleWebOptions, };
|
|
17
|
+
//# sourceMappingURL=apple-web-sign-in.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apple-web-sign-in.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/auth/sign-in/utils/apple-web-sign-in.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAUzD,uFAAuF;AACvF,KAAK,mBAAmB,GAAG,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,EAAE,YAAY,CAAC,CAAC;AAE1E,yFAAyF;AACzF,KAAK,eAAe,GAAG;IACrB,UAAU,EAAE,MAAM,CAAC;IAEnB,sCAAsC;IACtC,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAoCF,uFAAuF;AACvF,QAAA,MAAM,eAAe,QAAO,OAAO,CAAC,IAAI,CAgBvC,CAAC;AAmCF,kFAAkF;AAClF,QAAA,MAAM,eAAe,GAAU,8BAG5B,eAAe,KAAG,OAAO,CAAC,mBAAmB,CAa/C,CAAC;AAEF,0FAA0F;AAC1F,QAAA,MAAM,aAAa,GAAI,OAAO,OAAO,KAAG,OAG4B,CAAC;AAErE,OAAO,EACL,aAAa,EACb,eAAe,EACf,eAAe,EACf,KAAK,mBAAmB,EACxB,KAAK,eAAe,GACrB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
declare const GOOGLE_REQUEST_KEY = "ovok.google-sign-in";
|
|
2
|
+
declare const GOOGLE_ANSWER_KEY = "ovok.google-sign-in.answer";
|
|
3
|
+
/** Where the tab goes for the ID token, and which address Google returns it to. */
|
|
4
|
+
type GoogleRedirectOptions = {
|
|
5
|
+
clientId: string;
|
|
6
|
+
/** Defaults to the return page at `/oauth/google.html` on this site. */
|
|
7
|
+
redirectUri?: string;
|
|
8
|
+
};
|
|
9
|
+
/** Sends this tab to Google's sign-in page, remembering the request its answer must match. */
|
|
10
|
+
declare const startGoogleSignIn: ({ clientId, redirectUri }: GoogleRedirectOptions) => void;
|
|
11
|
+
/** The ID token Google sent back for this tab's own request; the request and the answer are forgotten either way. */
|
|
12
|
+
declare const takeGoogleIdToken: () => string | undefined;
|
|
13
|
+
export { GOOGLE_ANSWER_KEY, GOOGLE_REQUEST_KEY, startGoogleSignIn, takeGoogleIdToken, type GoogleRedirectOptions, };
|
|
14
|
+
//# sourceMappingURL=google-redirect-sign-in.d.ts.map
|
package/lib/typescript/commonjs/src/modules/auth/sign-in/utils/google-redirect-sign-in.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"google-redirect-sign-in.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/auth/sign-in/utils/google-redirect-sign-in.ts"],"names":[],"mappings":"AAIA,QAAA,MAAM,kBAAkB,wBAAwB,CAAC;AACjD,QAAA,MAAM,iBAAiB,+BAA+B,CAAC;AAWvD,mFAAmF;AACnF,KAAK,qBAAqB,GAAG;IAC3B,QAAQ,EAAE,MAAM,CAAC;IAEjB,wEAAwE;IACxE,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAoCF,8FAA8F;AAC9F,QAAA,MAAM,iBAAiB,GAAI,2BAA2B,qBAAqB,KAAG,IAgB7E,CAAC;AAoBF,qHAAqH;AACrH,QAAA,MAAM,iBAAiB,QAAO,MAAM,GAAG,SActC,CAAC;AAEF,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,KAAK,qBAAqB,GAC3B,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** The claims web sign-in reads from a provider's JWT. */
|
|
2
|
+
type JwtClaims = {
|
|
3
|
+
sub?: string;
|
|
4
|
+
nonce?: string;
|
|
5
|
+
};
|
|
6
|
+
/** A JWT's claims, read without checking the signature; Ovok verifies the token itself. */
|
|
7
|
+
declare const jwtClaims: (jwt: string) => JwtClaims;
|
|
8
|
+
export { jwtClaims, type JwtClaims };
|
|
9
|
+
//# sourceMappingURL=jwt-claims.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jwt-claims.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/auth/sign-in/utils/jwt-claims.ts"],"names":[],"mappings":"AAAA,0DAA0D;AAC1D,KAAK,SAAS,GAAG;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAKF,2FAA2F;AAC3F,QAAA,MAAM,SAAS,GAAI,KAAK,MAAM,KAAG,SAQhC,CAAC;AAEF,OAAO,EAAE,SAAS,EAAE,KAAK,SAAS,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sign-out-google.web.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/auth/utils/sign-out-google.web.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,eAAO,MAAM,qBAAqB,QAAa,OAAO,CAAC,IAAI,CAAc,CAAC"}
|
|
@@ -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"}
|
|
@@ -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("
|
|
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("
|
|
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("
|
|
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("
|
|
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;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { AppleLoginProps } from "../../types/apple-login-props";
|
|
3
|
+
/** Sign in with Apple in a popup, for the Services ID registered for this site; renders nothing without one. */
|
|
4
|
+
export declare const AppleLoginButton: ({ appleServicesId, ...props }: React.PropsWithChildren<AppleLoginProps>) => React.JSX.Element | null;
|
|
5
|
+
//# sourceMappingURL=apple-login-button.web.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apple-login-button.web.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/auth/sign-in/components/social-logins/apple-login-button.web.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAqEhE,gHAAgH;AAChH,eAAO,MAAM,gBAAgB,GAAI,+BAG9B,KAAK,CAAC,iBAAiB,CAAC,eAAe,CAAC,6BAGjC,CAAC"}
|
package/lib/typescript/module/src/modules/auth/sign-in/components/social-logins/apple-login.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @group Components
|
|
5
5
|
*/
|
|
6
|
-
export declare const AppleLogin: (({ testID, internalId, onSuccess, onError, style, disabled, children, ...props }: React.PropsWithChildren<import("
|
|
6
|
+
export declare const AppleLogin: (({ testID, internalId, onSuccess, onError, style, disabled, children, ...props }: React.PropsWithChildren<import("../..").AppleLoginProps>) => import("react").JSX.Element | null) & {
|
|
7
7
|
/** Apple icon. */
|
|
8
8
|
Icon: ({ size, color, style, ...props }: import("iconsax-react-nativejs").IconProps) => import("react").JSX.Element;
|
|
9
9
|
/** Button label. */
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { GoogleLoginProps } from "../../types/google-login-props";
|
|
3
|
+
/** Google's sign-in page in this tab; back on the sign-in screen, the ID token it sent signs the user in. */
|
|
4
|
+
export declare const GoogleLoginButton: ({ googleIosClientId: _googleIosClientId, googleWebClientId, googleRedirectUri, internalId, onSuccess, onError, testID, style, disabled, children, ...props }: React.PropsWithChildren<GoogleLoginProps>) => React.JSX.Element;
|
|
5
|
+
//# sourceMappingURL=google-login-button.web.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"google-login-button.web.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/auth/sign-in/components/social-logins/google-login-button.web.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAQlE,6GAA6G;AAC7G,eAAO,MAAM,iBAAiB,GAAI,8JAY/B,KAAK,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,sBAmD3C,CAAC"}
|
package/lib/typescript/module/src/modules/auth/sign-in/components/social-logins/google-login.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @group Components
|
|
5
5
|
*/
|
|
6
|
-
export declare const GoogleLogin: (({ googleIosClientId, googleWebClientId, internalId, onSuccess, onError, testID, style, disabled, children, ...props }: React.PropsWithChildren<import("
|
|
6
|
+
export declare const GoogleLogin: (({ googleIosClientId, googleWebClientId, internalId, onSuccess, onError, testID, style, disabled, children, ...props }: React.PropsWithChildren<import("../..").GoogleLoginProps>) => import("react").JSX.Element) & {
|
|
7
7
|
/** Google icon. */
|
|
8
8
|
Icon: import("react").FC<import("../../types/google-icon-props").GoogleIconProps>;
|
|
9
9
|
/** Button label. */
|
package/lib/typescript/module/src/modules/auth/sign-in/components/social-logins/social-logins.d.ts
CHANGED
|
@@ -8,14 +8,14 @@ import { SocialLoginsProps } from "../../types/social-logins-props";
|
|
|
8
8
|
export declare const SocialLogins: {
|
|
9
9
|
({ children, style, testID, }: React.PropsWithChildren<SocialLoginsProps>): React.JSX.Element;
|
|
10
10
|
/** Sign in with Google button. */
|
|
11
|
-
GoogleLogin: (({ googleIosClientId, googleWebClientId, internalId, onSuccess, onError, testID, style, disabled, children, ...props }: React.PropsWithChildren<import("
|
|
11
|
+
GoogleLogin: (({ googleIosClientId, googleWebClientId, internalId, onSuccess, onError, testID, style, disabled, children, ...props }: React.PropsWithChildren<import("../..").GoogleLoginProps>) => React.JSX.Element) & {
|
|
12
12
|
Icon: React.FC<import("../../types/google-icon-props").GoogleIconProps>;
|
|
13
13
|
Text: <TVariant extends import("react-native-paper").MD3TypescaleKey>({ children, style, testID, ...props }: Omit<import("react-native-paper").TextProps<TVariant>, "children"> & {
|
|
14
14
|
children?: React.ReactNode;
|
|
15
15
|
}) => React.JSX.Element;
|
|
16
16
|
};
|
|
17
17
|
/** Sign in with Apple button. */
|
|
18
|
-
AppleLogin: (({ testID, internalId, onSuccess, onError, style, disabled, children, ...props }: React.PropsWithChildren<import("
|
|
18
|
+
AppleLogin: (({ testID, internalId, onSuccess, onError, style, disabled, children, ...props }: React.PropsWithChildren<import("../..").AppleLoginProps>) => React.JSX.Element | null) & {
|
|
19
19
|
Icon: ({ size, color, style, ...props }: import("iconsax-react-nativejs").IconProps) => React.JSX.Element;
|
|
20
20
|
Text: <TVariant extends import("react-native-paper").MD3TypescaleKey>({ children, style, testID, ...props }: Omit<import("react-native-paper").TextProps<TVariant>, "children"> & {
|
|
21
21
|
children?: React.ReactNode;
|
|
@@ -7,5 +7,7 @@ export * from "./types/spacing-props";
|
|
|
7
7
|
export * from "./types/signin-form-forgot-password-props";
|
|
8
8
|
export * from "./types/login-with-separator-props";
|
|
9
9
|
export * from "./types/social-logins-props";
|
|
10
|
+
export * from "./types/google-login-props";
|
|
11
|
+
export * from "./types/apple-login-props";
|
|
10
12
|
export * from "./types/footer-props";
|
|
11
13
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/auth/sign-in/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE9C,cAAc,uBAAuB,CAAC;AACtC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,2CAA2C,CAAC;AAC1D,cAAc,oCAAoC,CAAC;AACnD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,sBAAsB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/auth/sign-in/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE9C,cAAc,uBAAuB,CAAC;AACtC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,2CAA2C,CAAC;AAC1D,cAAc,oCAAoC,CAAC;AACnD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC"}
|
|
@@ -1,10 +1,23 @@
|
|
|
1
1
|
import { TouchableOpacityProps } from "react-native";
|
|
2
2
|
import type { Session } from "@ovok/core/next";
|
|
3
|
+
/** Props of `SignIn.SocialLogins.AppleLogin`. */
|
|
3
4
|
export type AppleLoginProps = Omit<TouchableOpacityProps, "onPress" | "onPressIn" | "onPressOut" | "onLongPress" | "children"> & {
|
|
5
|
+
/** The `external-auth-internal-id` of the Apple entry on the ClientApplication; the web needs its own entry. */
|
|
4
6
|
internalId: string;
|
|
7
|
+
/** Web only: the Services ID Apple signs the user in for. Without it the button renders nothing on the web. */
|
|
8
|
+
appleServicesId?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Web only: a Return URL registered for the Services ID.
|
|
11
|
+
* Defaults to this site's origin.
|
|
12
|
+
*/
|
|
13
|
+
appleRedirectUri?: string;
|
|
14
|
+
/** Test identifier of the button. */
|
|
5
15
|
testID?: string;
|
|
16
|
+
/** Called with the session once the user has signed in. */
|
|
6
17
|
onSuccess?: (loginResponse: Session) => void;
|
|
18
|
+
/** Called when sign-in fails; a cancelled sign-in is not an error. */
|
|
7
19
|
onError?: (error: Error) => void;
|
|
20
|
+
/** Button content, usually `AppleLogin.Icon` and `AppleLogin.Text`. */
|
|
8
21
|
children: React.ReactNode;
|
|
9
22
|
};
|
|
10
23
|
//# sourceMappingURL=apple-login-props.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apple-login-props.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/auth/sign-in/types/apple-login-props.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAErD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAE/C,MAAM,MAAM,eAAe,GAAG,IAAI,CAChC,qBAAqB,EACrB,SAAS,GAAG,WAAW,GAAG,YAAY,GAAG,aAAa,GAAG,UAAU,CACpE,GAAG;
|
|
1
|
+
{"version":3,"file":"apple-login-props.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/auth/sign-in/types/apple-login-props.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAErD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAE/C,iDAAiD;AACjD,MAAM,MAAM,eAAe,GAAG,IAAI,CAChC,qBAAqB,EACrB,SAAS,GAAG,WAAW,GAAG,YAAY,GAAG,aAAa,GAAG,UAAU,CACpE,GAAG;IAEF,gHAAgH;IAChH,UAAU,EAAE,MAAM,CAAC;IAEnB,+GAA+G;IAC/G,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B,qCAAqC;IACrC,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,2DAA2D;IAC3D,SAAS,CAAC,EAAE,CAAC,aAAa,EAAE,OAAO,KAAK,IAAI,CAAC;IAE7C,sEAAsE;IACtE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IAEjC,uEAAuE;IACvE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC"}
|
|
@@ -1,12 +1,25 @@
|
|
|
1
1
|
import { TouchableOpacityProps } from "react-native";
|
|
2
2
|
import type { Session } from "@ovok/core/next";
|
|
3
|
+
/** Props of `SignIn.SocialLogins.GoogleLogin`. */
|
|
3
4
|
export type GoogleLoginProps = Omit<TouchableOpacityProps, "onPress" | "onPressIn" | "onPressOut" | "onLongPress" | "children"> & {
|
|
5
|
+
/** Google OAuth client ID for iOS; the web ignores it. */
|
|
4
6
|
googleIosClientId: string;
|
|
7
|
+
/** Google OAuth web client ID. On the web it is the client ID the sign-in page asks Google for. */
|
|
5
8
|
googleWebClientId: string;
|
|
9
|
+
/**
|
|
10
|
+
* Web only: the redirect URI Google returns to, which must be an Authorized redirect URI of the web client.
|
|
11
|
+
* Defaults to `/oauth/google.html` on this site, where the app serves `GOOGLE_RETURN_PAGE_HTML`.
|
|
12
|
+
*/
|
|
13
|
+
googleRedirectUri?: string;
|
|
14
|
+
/** The `external-auth-internal-id` of the Google entry on the ClientApplication. */
|
|
6
15
|
internalId: string;
|
|
16
|
+
/** Test identifier of the button. */
|
|
7
17
|
testID?: string;
|
|
18
|
+
/** Called with the session once the user has signed in. */
|
|
8
19
|
onSuccess?: (loginResponse: Session) => void;
|
|
20
|
+
/** Called when sign-in fails; a cancelled sign-in is not an error. */
|
|
9
21
|
onError?: (error: Error) => void;
|
|
22
|
+
/** Button content, usually `GoogleLogin.Icon` and `GoogleLogin.Text`. */
|
|
10
23
|
children: React.ReactNode;
|
|
11
24
|
};
|
|
12
25
|
//# sourceMappingURL=google-login-props.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"google-login-props.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/auth/sign-in/types/google-login-props.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAErD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAE/C,MAAM,MAAM,gBAAgB,GAAG,IAAI,CACjC,qBAAqB,EACrB,SAAS,GAAG,WAAW,GAAG,YAAY,GAAG,aAAa,GAAG,UAAU,CACpE,GAAG;
|
|
1
|
+
{"version":3,"file":"google-login-props.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/auth/sign-in/types/google-login-props.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAErD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAE/C,kDAAkD;AAClD,MAAM,MAAM,gBAAgB,GAAG,IAAI,CACjC,qBAAqB,EACrB,SAAS,GAAG,WAAW,GAAG,YAAY,GAAG,aAAa,GAAG,UAAU,CACpE,GAAG;IAEF,0DAA0D;IAC1D,iBAAiB,EAAE,MAAM,CAAC;IAE1B,mGAAmG;IACnG,iBAAiB,EAAE,MAAM,CAAC;IAE1B;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B,oFAAoF;IACpF,UAAU,EAAE,MAAM,CAAC;IAEnB,qCAAqC;IACrC,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,2DAA2D;IAC3D,SAAS,CAAC,EAAE,CAAC,aAAa,EAAE,OAAO,KAAK,IAAI,CAAC;IAE7C,sEAAsE;IACtE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IAEjC,yEAAyE;IACzE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { SocialCredentials } from "@ovok/core/next";
|
|
2
|
+
/** The Apple credentials Ovok takes, without the `internalId` of the sign-in entry. */
|
|
3
|
+
type AppleWebCredentials = Omit<SocialCredentials["apple"], "internalId">;
|
|
4
|
+
/** The Services ID Apple signs the user in for, and the return URL registered for it. */
|
|
5
|
+
type AppleWebOptions = {
|
|
6
|
+
servicesId: string;
|
|
7
|
+
/** Defaults to this site's origin. */
|
|
8
|
+
redirectUri?: string;
|
|
9
|
+
};
|
|
10
|
+
/** Loads Sign in with Apple JS once; a failed load is tried again on the next call. */
|
|
11
|
+
declare const loadAppleScript: () => Promise<void>;
|
|
12
|
+
/** Opens Apple's sign-in popup; it must run from a user gesture such as a tap. */
|
|
13
|
+
declare const signInWithApple: ({ servicesId, redirectUri, }: AppleWebOptions) => Promise<AppleWebCredentials>;
|
|
14
|
+
/** Whether the user closed Apple's popup or declined, which is not an error to report. */
|
|
15
|
+
declare const isAppleCancel: (cause: unknown) => boolean;
|
|
16
|
+
export { isAppleCancel, loadAppleScript, signInWithApple, type AppleWebCredentials, type AppleWebOptions, };
|
|
17
|
+
//# sourceMappingURL=apple-web-sign-in.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apple-web-sign-in.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/auth/sign-in/utils/apple-web-sign-in.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAUzD,uFAAuF;AACvF,KAAK,mBAAmB,GAAG,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,EAAE,YAAY,CAAC,CAAC;AAE1E,yFAAyF;AACzF,KAAK,eAAe,GAAG;IACrB,UAAU,EAAE,MAAM,CAAC;IAEnB,sCAAsC;IACtC,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAoCF,uFAAuF;AACvF,QAAA,MAAM,eAAe,QAAO,OAAO,CAAC,IAAI,CAgBvC,CAAC;AAmCF,kFAAkF;AAClF,QAAA,MAAM,eAAe,GAAU,8BAG5B,eAAe,KAAG,OAAO,CAAC,mBAAmB,CAa/C,CAAC;AAEF,0FAA0F;AAC1F,QAAA,MAAM,aAAa,GAAI,OAAO,OAAO,KAAG,OAG4B,CAAC;AAErE,OAAO,EACL,aAAa,EACb,eAAe,EACf,eAAe,EACf,KAAK,mBAAmB,EACxB,KAAK,eAAe,GACrB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
declare const GOOGLE_REQUEST_KEY = "ovok.google-sign-in";
|
|
2
|
+
declare const GOOGLE_ANSWER_KEY = "ovok.google-sign-in.answer";
|
|
3
|
+
/** Where the tab goes for the ID token, and which address Google returns it to. */
|
|
4
|
+
type GoogleRedirectOptions = {
|
|
5
|
+
clientId: string;
|
|
6
|
+
/** Defaults to the return page at `/oauth/google.html` on this site. */
|
|
7
|
+
redirectUri?: string;
|
|
8
|
+
};
|
|
9
|
+
/** Sends this tab to Google's sign-in page, remembering the request its answer must match. */
|
|
10
|
+
declare const startGoogleSignIn: ({ clientId, redirectUri }: GoogleRedirectOptions) => void;
|
|
11
|
+
/** The ID token Google sent back for this tab's own request; the request and the answer are forgotten either way. */
|
|
12
|
+
declare const takeGoogleIdToken: () => string | undefined;
|
|
13
|
+
export { GOOGLE_ANSWER_KEY, GOOGLE_REQUEST_KEY, startGoogleSignIn, takeGoogleIdToken, type GoogleRedirectOptions, };
|
|
14
|
+
//# sourceMappingURL=google-redirect-sign-in.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"google-redirect-sign-in.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/auth/sign-in/utils/google-redirect-sign-in.ts"],"names":[],"mappings":"AAIA,QAAA,MAAM,kBAAkB,wBAAwB,CAAC;AACjD,QAAA,MAAM,iBAAiB,+BAA+B,CAAC;AAWvD,mFAAmF;AACnF,KAAK,qBAAqB,GAAG;IAC3B,QAAQ,EAAE,MAAM,CAAC;IAEjB,wEAAwE;IACxE,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAoCF,8FAA8F;AAC9F,QAAA,MAAM,iBAAiB,GAAI,2BAA2B,qBAAqB,KAAG,IAgB7E,CAAC;AAoBF,qHAAqH;AACrH,QAAA,MAAM,iBAAiB,QAAO,MAAM,GAAG,SActC,CAAC;AAEF,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,KAAK,qBAAqB,GAC3B,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** The claims web sign-in reads from a provider's JWT. */
|
|
2
|
+
type JwtClaims = {
|
|
3
|
+
sub?: string;
|
|
4
|
+
nonce?: string;
|
|
5
|
+
};
|
|
6
|
+
/** A JWT's claims, read without checking the signature; Ovok verifies the token itself. */
|
|
7
|
+
declare const jwtClaims: (jwt: string) => JwtClaims;
|
|
8
|
+
export { jwtClaims, type JwtClaims };
|
|
9
|
+
//# sourceMappingURL=jwt-claims.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jwt-claims.d.ts","sourceRoot":"","sources":["../../../../../../../../src/modules/auth/sign-in/utils/jwt-claims.ts"],"names":[],"mappings":"AAAA,0DAA0D;AAC1D,KAAK,SAAS,GAAG;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAKF,2FAA2F;AAC3F,QAAA,MAAM,SAAS,GAAI,KAAK,MAAM,KAAG,SAQhC,CAAC;AAEF,OAAO,EAAE,SAAS,EAAE,KAAK,SAAS,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sign-out-google.web.d.ts","sourceRoot":"","sources":["../../../../../../../src/modules/auth/utils/sign-out-google.web.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,eAAO,MAAM,qBAAqB,QAAa,OAAO,CAAC,IAAI,CAAc,CAAC"}
|