@rpcbase/auth 0.14.0 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/api/sign-in/handler.ts +3 -5
- package/src/api/sign-in/index.ts +1 -0
- package/src/api/sign-out/index.ts +1 -0
- package/src/api/sign-up/handler.ts +1 -1
- package/src/api/sign-up/index.ts +1 -0
- package/src/components/AppleSignInButton/index.tsx +2 -1
- package/src/components/EmailOrPhoneInput/index.tsx +1 -0
- package/src/components/RememberMeCheckbox/index.tsx +2 -1
package/package.json
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
// import crypto from "crypto"
|
|
2
1
|
import isEmail from "validator/lib/isEmail"
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
import { hashPassword } from "@rpcbase/server"
|
|
2
|
+
import {Api, /*loadModel,*/ Ctx, ApiHandler} from "@rpcbase/api"
|
|
3
|
+
// import { hashPassword } from "@rpcbase/server"
|
|
6
4
|
|
|
7
5
|
import * as SignIn from "./index"
|
|
8
6
|
|
|
9
7
|
|
|
10
8
|
const signIn = async(payload: SignIn.RequestPayload, ctx: Ctx): Promise<SignIn.ResponsePayload> => {
|
|
11
|
-
const User = await loadModel("User", ctx)
|
|
9
|
+
// const User = await loadModel("User", ctx)
|
|
12
10
|
|
|
13
11
|
const {email_or_phone} = SignIn.requestSchema.parse(payload)
|
|
14
12
|
|
package/src/api/sign-in/index.ts
CHANGED
package/src/api/sign-up/index.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import clsx from "clsx"
|
|
2
2
|
|
|
3
|
+
|
|
3
4
|
export const AppleSignInButton = ({
|
|
4
5
|
onPress,
|
|
5
6
|
className,
|
|
@@ -30,7 +31,7 @@ export const AppleSignInButton = ({
|
|
|
30
31
|
>
|
|
31
32
|
<path d="M12.152 6.896c-.948 0-2.415-1.078-3.96-1.04-2.04.027-3.91 1.183-4.961 3.014-2.117 3.675-.539 9.103 1.519 12.09 1.013 1.454 2.208 3.09 3.792 3.039 1.52-.065 2.09-.987 3.935-.987 1.831 0 2.35.987 3.96.948 1.637-.026 2.676-1.48 3.676-2.948 1.156-1.688 1.636-3.325 1.662-3.415-.039-.013-3.182-1.221-3.22-4.857-.026-3.04 2.48-4.494 2.597-4.559-1.429-2.09-3.623-2.324-4.39-2.376-2-.156-3.675 1.09-4.61 1.09zM15.53 3.83c.843-1.012 1.4-2.427 1.245-3.83-1.207.052-2.662.805-3.532 1.818-.78.896-1.454 2.338-1.273 3.714 1.338.104 2.715-.688 3.559-1.701" />
|
|
32
33
|
</svg>
|
|
33
|
-
Continuer avec Apple
|
|
34
|
+
<span>Continuer avec Apple</span>
|
|
34
35
|
</button>
|
|
35
36
|
)
|
|
36
37
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {ComponentType} from "react"
|
|
2
2
|
import {useFormContext} from "@rpcbase/form"
|
|
3
3
|
|
|
4
|
+
|
|
4
5
|
export const RememberMeCheckbox = ({
|
|
5
6
|
label,
|
|
6
7
|
as: Component = "input"
|
|
@@ -8,7 +9,7 @@ export const RememberMeCheckbox = ({
|
|
|
8
9
|
label: string,
|
|
9
10
|
as?: ComponentType<any> | string
|
|
10
11
|
}) => {
|
|
11
|
-
const {register
|
|
12
|
+
const {register} = useFormContext()
|
|
12
13
|
|
|
13
14
|
return (
|
|
14
15
|
<>
|