@springmicro/auth 0.5.0 → 0.5.1

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,4 +1,4 @@
1
- import { i as D, t as ue, q as h, B as f, o as He, s as I, y as ce, C as ze, u as je, d as P, n as w, f as $, g as U, e as te } from "./Web3Auth-DhI1eSsQ.js";
1
+ import { i as D, t as ue, q as h, B as f, o as He, s as I, y as ce, C as ze, u as je, d as P, n as w, f as $, g as U, e as te } from "./Web3Auth-D-jzK5S2.js";
2
2
  function A(e) {
3
3
  if (!Number.isSafeInteger(e) || e < 0)
4
4
  throw new Error(`Wrong positive integer: ${e}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@springmicro/auth",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -54,5 +54,5 @@
54
54
  "react-social-login-buttons": "^4.1.0",
55
55
  "uuid": "^9.0.1"
56
56
  },
57
- "gitHead": "2e8437c70ee3c659e08cde72c14de20988214a0a"
57
+ "gitHead": "e70cccb664b3229f00fd70be3f443f210124230d"
58
58
  }
@@ -66,7 +66,9 @@ export function getApplication(owner: string, name: string) {
66
66
  }/api/get-application?id=${owner}/${encodeURIComponent(name)}`,
67
67
  {
68
68
  method: "GET",
69
- // credentials: "include",
69
+ credentials: Setting.ROOT_URLS.casdoor.startsWith("https")
70
+ ? "include"
71
+ : undefined,
70
72
  headers: {
71
73
  "Accept-Language": Setting.getAcceptLanguage(),
72
74
  },
@@ -185,7 +185,7 @@ export function sendCode(
185
185
  console.log(Object.fromEntries(formData.entries()));
186
186
  return fetch(`${ROOT_URLS.casdoor}/api/send-verification-code`, {
187
187
  method: "POST",
188
- // credentials: "include",
188
+ credentials: ROOT_URLS.casdoor.startsWith("https") ? "include" : undefined,
189
189
  body: formData,
190
190
  headers: {
191
191
  "Accept-Language": getAcceptLanguage(),
@@ -166,8 +166,5 @@ export function getDefaultValues(signupItems: SignupItem[]) {
166
166
 
167
167
  export function requiresCode(signupItem: SignupItem) {
168
168
  const key = getKey(signupItem);
169
- return (
170
- (key === "email" || key === "phone") &&
171
- signupItem.rule !== "No verification"
172
- );
169
+ return (key === "email" || key === "phone") && signupItem.rule !== "None";
173
170
  }