miolo 3.0.0-beta.185 → 3.0.0-beta.187
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/bin/build/build_bin.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { cleanFolder } from "../util.mjs"
|
|
1
|
+
// import { cleanFolder } from "../util.mjs"
|
|
2
2
|
import { miolo_build_server } from "./server/index.mjs"
|
|
3
3
|
|
|
4
4
|
export default async function (appName, binEntry, binDest, binName, binExt) {
|
|
@@ -7,7 +7,7 @@ export default async function (appName, binEntry, binDest, binName, binExt) {
|
|
|
7
7
|
const pkgPath = process.cwd()
|
|
8
8
|
|
|
9
9
|
// 1. Clean destination folder
|
|
10
|
-
cleanFolder(binDest)
|
|
10
|
+
// cleanFolder(binDest)
|
|
11
11
|
|
|
12
12
|
// 2. Build Backend script
|
|
13
13
|
await miolo_build_server(appName, pkgPath, {}, binEntry, binDest, binName, binExt)
|
package/package.json
CHANGED
|
@@ -115,6 +115,14 @@ const init_passport_auth_middleware = (app, options, sessionConfig, cacheConfig)
|
|
|
115
115
|
: undefined
|
|
116
116
|
try {
|
|
117
117
|
local_auth_user_f(username, password, ctx).then(([user, msg]) => {
|
|
118
|
+
ctx.body = {
|
|
119
|
+
authenticated: user || false,
|
|
120
|
+
message: msg,
|
|
121
|
+
user: user,
|
|
122
|
+
config: {
|
|
123
|
+
auth_method: "local"
|
|
124
|
+
}
|
|
125
|
+
}
|
|
118
126
|
return done(null, user || false, { message: msg || "" })
|
|
119
127
|
})
|
|
120
128
|
} catch (error) {
|
|
@@ -141,6 +149,14 @@ const init_passport_auth_middleware = (app, options, sessionConfig, cacheConfig)
|
|
|
141
149
|
: undefined
|
|
142
150
|
try {
|
|
143
151
|
google_auth_user_f(accessToken, refreshToken, profile, ctx).then(([user, msg]) => {
|
|
152
|
+
ctx.body = {
|
|
153
|
+
authenticated: user || false,
|
|
154
|
+
message: msg,
|
|
155
|
+
user: user,
|
|
156
|
+
config: {
|
|
157
|
+
auth_method: "google"
|
|
158
|
+
}
|
|
159
|
+
}
|
|
144
160
|
return done(null, user || false, { message: msg || "" })
|
|
145
161
|
})
|
|
146
162
|
} catch (error) {
|
|
@@ -215,7 +231,10 @@ const init_passport_auth_middleware = (app, options, sessionConfig, cacheConfig)
|
|
|
215
231
|
ok: true,
|
|
216
232
|
data: {
|
|
217
233
|
user: user,
|
|
218
|
-
authenticated: true
|
|
234
|
+
authenticated: true,
|
|
235
|
+
config: {
|
|
236
|
+
auth_method: "local"
|
|
237
|
+
}
|
|
219
238
|
}
|
|
220
239
|
}
|
|
221
240
|
|
package/template/package.json
CHANGED
|
@@ -45,9 +45,9 @@
|
|
|
45
45
|
"intre": "^3.0.0-beta.4",
|
|
46
46
|
"joi": "^18.1.2",
|
|
47
47
|
"lucide-react": "^1.14.0",
|
|
48
|
-
"miolo-cli": "^3.0.0-beta.
|
|
48
|
+
"miolo-cli": "^3.0.0-beta.187",
|
|
49
49
|
"miolo-model": "file:../miolo-model",
|
|
50
|
-
"miolo-react": "^3.0.0-beta.
|
|
50
|
+
"miolo-react": "^3.0.0-beta.187",
|
|
51
51
|
"next-themes": "^0.4.6",
|
|
52
52
|
"radix-ui": "^1.4.3",
|
|
53
53
|
"react": "^19.2.5",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
64
|
"@biomejs/biome": "2.4.14",
|
|
65
|
-
"miolo": "^3.0.0-beta.
|
|
65
|
+
"miolo": "^3.0.0-beta.187",
|
|
66
66
|
"sass-embedded": "^1.99.0"
|
|
67
67
|
},
|
|
68
68
|
"overrides": {
|
|
@@ -14,8 +14,8 @@ export function LoginForm({ className, forgotLink }) {
|
|
|
14
14
|
const handleLocalLogin = useCallback(
|
|
15
15
|
async (ev) => {
|
|
16
16
|
ev.preventDefault()
|
|
17
|
-
const
|
|
18
|
-
setValid(authenticated === true)
|
|
17
|
+
const data = await localLogin({ username: email, password: pwd })
|
|
18
|
+
setValid(data?.authenticated === true)
|
|
19
19
|
},
|
|
20
20
|
[email, pwd, localLogin]
|
|
21
21
|
)
|