import 'dart:convert'; import 'package:angel3_framework/angel3_framework.dart'; import 'package:http_parser/http_parser.dart'; import 'options.dart'; /// Displays a default callback page to confirm authentication via popups. AngelAuthCallback confirmPopupAuthentication({String eventName = 'token'}) { return (req, ResponseContext res, String jwt) { var evt = json.encode(eventName); var detail = json.encode({'detail': jwt}); res ..contentType = MediaType('text', 'html') ..write(''' Authentication Success

Authentication Success

Now logging you in... If you continue to see this page, you may need to enable JavaScript.

'''); return false; }; }