@rpcbase/client 0.23.0 → 0.25.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.
@@ -15,7 +15,6 @@ import "./sign-in.scss"
15
15
 
16
16
  const log = debug("rb:auth:signin")
17
17
 
18
-
19
18
  const SignIn = ({
20
19
  name,
21
20
  logo,
@@ -48,7 +47,6 @@ const SignIn = ({
48
47
  if (res.status === "ok") {
49
48
  log("signed in res: ok", res)
50
49
  log("redirect to:", redirect || onSuccessRedirect)
51
-
52
50
  set_is_signed_in(true)
53
51
  if (redirect) {
54
52
  page(redirect)
@@ -84,7 +82,7 @@ const SignIn = ({
84
82
 
85
83
  <h1 className="h4 mt-3 mb-3 fw-normal">Sign In</h1>
86
84
  <p className="text-start text-muted">
87
- Use your email and password to sign in.<br />Don't have an account?
85
+ Don't have an account?
88
86
  <a href="/signup" className="ms-1">Sign up here</a>
89
87
  </p>
90
88
 
@@ -114,16 +112,6 @@ const SignIn = ({
114
112
  <label htmlFor="input-password">Password</label>
115
113
  </div>
116
114
 
117
- <div className="checkbox mt-3 mb-1 text-start">
118
- <label style={{cursor: "pointer", userSelect: "none"}}>
119
- <input
120
- className="me-1"
121
- type="checkbox"
122
- value="remember-me"
123
- defaultChecked /> Remember me
124
- </label>
125
- </div>
126
-
127
115
  <div className="mt-2 text-start w-100">
128
116
  <a href={`/forgot-password${forgotUrlParam && "#" + forgotUrlParam}`}>Forgot your password?</a>
129
117
  </div>
@@ -1,6 +1,8 @@
1
1
  /* @flow */
2
2
  import {useState} from "react"
3
+ import page from "page"
3
4
 
5
+ import {set_is_signed_in} from "../index"
4
6
  import post from "../../helpers/post"
5
7
  import Footer from "../Footer"
6
8
 
@@ -24,7 +26,8 @@ const SignUp = ({
24
26
  }
25
27
  const res = await post("/api/v1/auth/sign_up", {email, password})
26
28
  if (res.status === "ok") {
27
- window.location = onSuccessRedirect
29
+ set_is_signed_in(true)
30
+ page(onSuccessRedirect)
28
31
  } else if (res.status === "error") {
29
32
  setError(res.message)
30
33
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rpcbase/client",
3
- "version": "0.23.0",
3
+ "version": "0.25.0",
4
4
  "scripts": {
5
5
  "test": "echo \"Error: no test specified\" && exit 0"
6
6
  },