Fix: Pusher-Key-Fehler + wire:model remember + Reverb-Keys im Installer
- connection.js: Echo nur initialisieren wenn VITE_REVERB_APP_KEY gesetzt - LoginForm: $remember Property ergänzt - installer.sh: Reverb-Keys automatisch generieren und in .env schreiben Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>main
parent
7c3376bfbc
commit
94cddb7987
|
|
@ -12,6 +12,7 @@ class LoginForm extends Component
|
||||||
|
|
||||||
public string $name = '';
|
public string $name = '';
|
||||||
public string $password = '';
|
public string $password = '';
|
||||||
|
public bool $remember = false;
|
||||||
public ?string $error = null;
|
public ?string $error = null;
|
||||||
public bool $show = false;
|
public bool $show = false;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -507,6 +507,13 @@ sed -i "s|^REDIS_HOST=.*|REDIS_HOST=127.0.0.1|g" "${APP_DIR}/.env"
|
||||||
sed -i "s|^REDIS_PASSWORD=.*|REDIS_PASSWORD=null|g" "${APP_DIR}/.env"
|
sed -i "s|^REDIS_PASSWORD=.*|REDIS_PASSWORD=null|g" "${APP_DIR}/.env"
|
||||||
sed -i "s|^REDIS_PORT=.*|REDIS_PORT=6379|g" "${APP_DIR}/.env"
|
sed -i "s|^REDIS_PORT=.*|REDIS_PORT=6379|g" "${APP_DIR}/.env"
|
||||||
|
|
||||||
|
REVERB_APP_ID="$(short)"
|
||||||
|
REVERB_APP_KEY="$(short)"
|
||||||
|
REVERB_APP_SECRET="$(short)"
|
||||||
|
grep -q '^REVERB_APP_ID=' "${APP_DIR}/.env" \
|
||||||
|
|| printf '\nREVERB_APP_ID=%s\nREVERB_APP_KEY=%s\nREVERB_APP_SECRET=%s\nREVERB_HOST=127.0.0.1\nREVERB_PORT=8080\nREVERB_SCHEME=http\nVITE_REVERB_APP_KEY=%s\nVITE_REVERB_HOST=${SERVER_IP}\nVITE_REVERB_PORT=8080\nVITE_REVERB_SCHEME=http\n' \
|
||||||
|
"$REVERB_APP_ID" "$REVERB_APP_KEY" "$REVERB_APP_SECRET" "$REVERB_APP_KEY" >> "${APP_DIR}/.env"
|
||||||
|
|
||||||
# Bootstrap-Admin für den ersten Login
|
# Bootstrap-Admin für den ersten Login
|
||||||
BOOTSTRAP_USER="${APP_USER}"
|
BOOTSTRAP_USER="${APP_USER}"
|
||||||
BOOTSTRAP_EMAIL="${APP_USER}@localhost"
|
BOOTSTRAP_EMAIL="${APP_USER}@localhost"
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,20 @@
|
||||||
import Echo from 'laravel-echo';
|
import Echo from 'laravel-echo';
|
||||||
|
|
||||||
import Pusher from 'pusher-js';
|
import Pusher from 'pusher-js';
|
||||||
window.Pusher = Pusher;
|
|
||||||
|
|
||||||
window.Echo = new Echo({
|
const reverbKey = import.meta.env.VITE_REVERB_APP_KEY;
|
||||||
broadcaster: 'reverb',
|
|
||||||
key: import.meta.env.VITE_REVERB_APP_KEY,
|
|
||||||
wsHost: import.meta.env.VITE_REVERB_HOST,
|
|
||||||
wsPort: import.meta.env.VITE_REVERB_PORT ?? 80,
|
|
||||||
wssPort: import.meta.env.VITE_REVERB_PORT ?? 443,
|
|
||||||
wsPath: '/ws',
|
|
||||||
forceTLS: (import.meta.env.VITE_REVERB_SCHEME ?? 'https') === 'https',
|
|
||||||
enabledTransports: ['ws', 'wss'],
|
|
||||||
});
|
|
||||||
|
|
||||||
export default Echo;
|
if (reverbKey) {
|
||||||
|
window.Pusher = Pusher;
|
||||||
|
window.Echo = new Echo({
|
||||||
|
broadcaster: 'reverb',
|
||||||
|
key: reverbKey,
|
||||||
|
wsHost: import.meta.env.VITE_REVERB_HOST,
|
||||||
|
wsPort: import.meta.env.VITE_REVERB_PORT ?? 80,
|
||||||
|
wssPort: import.meta.env.VITE_REVERB_PORT ?? 443,
|
||||||
|
wsPath: '/ws',
|
||||||
|
forceTLS: (import.meta.env.VITE_REVERB_SCHEME ?? 'https') === 'https',
|
||||||
|
enabledTransports: ['ws', 'wss'],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export default window.Echo ?? null;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue