@rpcbase/client 0.149.0 → 0.150.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.
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/* @flow */
|
|
2
2
|
import assert from "assert"
|
|
3
|
+
import debug from "debug"
|
|
3
4
|
import {useState, useEffect} from "react"
|
|
4
5
|
import {useSearchParam} from "react-use"
|
|
5
6
|
import isEmail from "validator/lib/isEmail"
|
|
@@ -7,8 +8,10 @@ import page from "page"
|
|
|
7
8
|
|
|
8
9
|
import post from "../../helpers/post"
|
|
9
10
|
import {reconnect as rts_reconnect} from "../../rts/rts"
|
|
11
|
+
import {set_is_signed_in, setUid, set_tenant_id} from "../index"
|
|
10
12
|
|
|
11
13
|
|
|
14
|
+
const log = debug("rb:auth:signin")
|
|
12
15
|
|
|
13
16
|
const SignInEmailForm = ({onSuccess, onSuccessRedirect}) => {
|
|
14
17
|
const redirect = useSearchParam("redirect")
|
package/auth/SignIn/index.js
CHANGED
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
/* @flow */
|
|
2
2
|
import assert from "assert"
|
|
3
|
-
import page from "page"
|
|
4
|
-
import debug from "debug"
|
|
5
3
|
|
|
6
4
|
import authConfig from "@rpcbase/dot-rb/auth"
|
|
7
5
|
|
|
8
|
-
import {set_is_signed_in, setUid, set_tenant_id} from "../index"
|
|
9
|
-
|
|
10
6
|
import {AUTH_BUTTONS} from "../../src/ui/oauth"
|
|
11
7
|
import Footer from "../Footer"
|
|
12
8
|
|
|
@@ -15,8 +11,6 @@ import SignInEmailForm from "./SignInEmailForm"
|
|
|
15
11
|
import "./sign-in.scss"
|
|
16
12
|
|
|
17
13
|
|
|
18
|
-
const log = debug("rb:auth:signin")
|
|
19
|
-
|
|
20
14
|
const hasOAuth = authConfig.oauth_providers?.length > 0
|
|
21
15
|
const hasEmail = authConfig.has_email_signup
|
|
22
16
|
|