authera 1.2.1 → 1.2.2

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/dist/web/login.js CHANGED
@@ -10,7 +10,7 @@ export default function LoginForm() {
10
10
  const [activeStep, activeStepHandler] = useState();
11
11
  const [loading, loadingHandler] = useState(true);
12
12
  const { handleSubmit, control } = useForm();
13
- const { go_after_login_url, backendUrl } = useAuth();
13
+ const { go_after_login_url, backendUrl, setUserData } = useAuth();
14
14
  const request = axios.create({
15
15
  baseURL: backendUrl,
16
16
  });
@@ -38,6 +38,7 @@ export default function LoginForm() {
38
38
  // if response say authenticate is finished
39
39
  else if (response.status === 200) {
40
40
  window.location.href = go_after_login_url;
41
+ setUserData(response.data);
41
42
  }
42
43
  // if response say have a wrong in this request
43
44
  else if (response.status === 400) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "authera",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "description": "this project is a simple auth hook for react",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",