Skip to main content

secure_flow 0.2.0 copy "secure_flow: ^0.2.0" to clipboard
secure_flow: ^0.2.0 copied to clipboard

Pure-Dart browser round trips for desktop apps and command line tools: OAuth redirects, reCAPTCHA (v2 and Enterprise) and code entry answered over a hardened one-shot loopback server, and reCAPTCHA in [...]

example/main.dart

// Asks for a code with the presenter that fits the environment: at the terminal when there is
// one, otherwise in a small page in the system browser.
//
//     dart run example/main.dart

import 'dart:io';

import 'package:secure_flow/secure_flow.dart';

Future<void> main() async {
  try {
    final String code = await const CodeEntryFlow(
      prompt: 'Type any code to finish the example',
    ).run(timeout: const Duration(minutes: 2));
    stdout.writeln('Received a code of ${code.length} characters.');
  } on SecureFlowException catch (e) {
    stderr.writeln(e.message);
    exitCode = 1;
  }
}
0
likes
150
points
139
downloads

Documentation

API reference

Publisher

verified publisherupcode.dev

Weekly Downloads

Pure-Dart browser round trips for desktop apps and command line tools: OAuth redirects, reCAPTCHA (v2 and Enterprise) and code entry answered over a hardened one-shot loopback server, and reCAPTCHA in the page of a web app.

Homepage
Repository (GitHub)
View/report issues
Contributing

Topics

#oauth #authentication #cli #desktop

License

Apache-2.0 (license)

More

Packages that depend on secure_flow