f
Some checks are pending
Backend CI / test (push) Waiting to run
Backend CI / build (push) Blocked by required conditions
Deploy Mnemo Cards / Deploy Backend (push) Waiting to run
Deploy Mnemo Cards / Deploy Web App (push) Blocked by required conditions
Deploy Mnemo Cards / Final Verification (push) Blocked by required conditions
Some checks are pending
Backend CI / test (push) Waiting to run
Backend CI / build (push) Blocked by required conditions
Deploy Mnemo Cards / Deploy Backend (push) Waiting to run
Deploy Mnemo Cards / Deploy Web App (push) Blocked by required conditions
Deploy Mnemo Cards / Final Verification (push) Blocked by required conditions
This commit is contained in:
parent
22340d78ef
commit
115fa26d46
1 changed files with 5 additions and 2 deletions
|
|
@ -3,6 +3,7 @@ import 'dart:io';
|
|||
import 'dart:math';
|
||||
|
||||
import 'package:crypto/crypto.dart';
|
||||
import 'package:drift/drift.dart';
|
||||
import 'package:drift_postgres/drift_postgres.dart';
|
||||
import 'package:injectable/injectable.dart';
|
||||
import 'package:mnemo_cards_backend/database/database.dart';
|
||||
|
|
@ -242,12 +243,14 @@ class JwtService {
|
|||
}
|
||||
|
||||
// Store new token
|
||||
final now = DateTime.now();
|
||||
await _db.userDao.createRefreshToken(
|
||||
RefreshTokensCompanion.insert(
|
||||
jti: jti,
|
||||
userId: userId,
|
||||
expiresAt: PgDateTime(expiresAt), // required field - raw DateTime
|
||||
// createdAt and isBlacklisted use defaults from table
|
||||
expiresAt: PgDateTime(expiresAt),
|
||||
isBlacklisted: Value(false),
|
||||
createdAt: Value(PgDateTime(now)),
|
||||
),
|
||||
);
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue