Frontend WIP - just websocket support left
This commit is contained in:
@@ -8,7 +8,7 @@ final log = Logger('Environment');
|
||||
|
||||
bool _isDevEnv = false;
|
||||
|
||||
void checkEnvironment(bool isDevEnv) {
|
||||
void checkEnvironment({required bool isDevEnv}) {
|
||||
_isDevEnv = isDevEnv;
|
||||
getJWTSecret();
|
||||
}
|
||||
@@ -46,7 +46,9 @@ String? getJWTSecret() {
|
||||
if (_isDevEnv) {
|
||||
log.warning('JWT secret not configured. Define JWT_TOKEN_SECRET in environment.');
|
||||
final secret = List.generate(
|
||||
24, (_) => String.fromCharCode((65 + Random().nextInt(26)) + (Random().nextInt(2) == 0 ? 0 : 32))).join();
|
||||
24,
|
||||
(_) => String.fromCharCode((65 + Random().nextInt(26)) + (Random().nextInt(2) == 0 ? 0 : 32)),
|
||||
).join();
|
||||
log.warning('Generated random JWT secret for development: $secret');
|
||||
return secret;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user