ok<T> static method
Asserts result is a Ok and returns its value.
Implementation
static T ok<T>(Result<T> result, {String? reason}) => result.match(
ok: (T value) => value,
err: (Problem problem) =>
throw AuthAssertionError(reason ?? 'expected Ok but got Err($problem)'),
);