hightjs 0.2.4 → 0.2.42
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/README.md +3 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -347,7 +347,7 @@ import type { AuthConfig } from 'hightjs/auth';
|
|
|
347
347
|
|
|
348
348
|
export const authConfig: AuthConfig = {
|
|
349
349
|
providers: [
|
|
350
|
-
CredentialsProvider({
|
|
350
|
+
new CredentialsProvider({
|
|
351
351
|
id: 'credentials',
|
|
352
352
|
name: 'Credentials',
|
|
353
353
|
credentials: {
|
|
@@ -435,12 +435,7 @@ function LoginPage() {
|
|
|
435
435
|
const [error, setError] = useState<string | null>(null);
|
|
436
436
|
|
|
437
437
|
const handleDiscordLogin = async () => {
|
|
438
|
-
|
|
439
|
-
if(result) {
|
|
440
|
-
if (result.url != null) {
|
|
441
|
-
window.location.href = result.url
|
|
442
|
-
}
|
|
443
|
-
}
|
|
438
|
+
await signIn('discord', { redirect: true });
|
|
444
439
|
}
|
|
445
440
|
|
|
446
441
|
const handleLogin = async (e: React.FormEvent) => {
|
|
@@ -450,7 +445,6 @@ function LoginPage() {
|
|
|
450
445
|
|
|
451
446
|
try {
|
|
452
447
|
const result = await signIn('credentials', {
|
|
453
|
-
redirect: false,
|
|
454
448
|
username: username,
|
|
455
449
|
password: password,
|
|
456
450
|
callbackUrl: '/'
|
|
@@ -461,7 +455,7 @@ function LoginPage() {
|
|
|
461
455
|
setIsLoading(false);
|
|
462
456
|
return;
|
|
463
457
|
}
|
|
464
|
-
|
|
458
|
+
router.push("/")
|
|
465
459
|
} catch (err) {
|
|
466
460
|
setError('Ocorreu um erro inesperado. Tente novamente.');
|
|
467
461
|
setIsLoading(false);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hightjs",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.42",
|
|
4
4
|
"description": "HightJS is a high-level framework for building web applications with ease and speed. It provides a robust set of tools and features to streamline development and enhance productivity.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|