removeCode method Null safety

  1. @override
Future removeCode(
  1. AuthServer server,
  2. String? code
)
override

Must remove AuthCode identified by code.

The AuthCode.code matching code must be deleted and no longer accessible.

Implementation

@override
Future removeCode(AuthServer server, String? code) {
  final query = Query<ManagedAuthToken>(context!)
    ..where((o) => o.code).equalTo(code);

  return query.delete();
}