refactor: refactoring client and auth files
This commit is contained in:
parent
b0fee2ca94
commit
0f70a5bc8e
6 changed files with 6 additions and 6 deletions
|
@ -52,7 +52,7 @@ configureServer(Angel app) async {
|
|||
|
||||
## Default Authentication Callback
|
||||
|
||||
A frequent use case within SPA's is opening OAuth login endpoints in a separate window. [`angel3_client`](https://pub.dev/packages/angel3_client) provides a facility for this, which works perfectly with the default callback provided in this package.
|
||||
A frequent use case within SPA's is opening OAuth login endpoints in a separate window. [`platform_client`](https://pub.dev/packages/platform_client) provides a facility for this, which works perfectly with the default callback provided in this package.
|
||||
|
||||
```dart
|
||||
configureServer(Angel app) async {
|
||||
|
@ -75,7 +75,7 @@ configureServer(Angel app) async {
|
|||
}
|
||||
```
|
||||
|
||||
This renders a simple HTML page that fires the user's JWT as a `token` event in `window.opener`. `angel3_client` [exposes this as a Stream](https://pub.dev/documentation/angel3_client/latest/):
|
||||
This renders a simple HTML page that fires the user's JWT as a `token` event in `window.opener`. `platform_client` [exposes this as a Stream](https://pub.dev/documentation/platform_client/latest/):
|
||||
|
||||
```dart
|
||||
app.authenticateViaPopup('/auth/google').listen((jwt) {
|
||||
|
|
|
@ -8,7 +8,7 @@ import 'dart:convert';
|
|||
import 'package:http/browser_client.dart' as http;
|
||||
import 'platform_client.dart';
|
||||
// import 'auth_types.dart' as auth_types;
|
||||
import 'base_angel_client.dart';
|
||||
import 'base_platform_client.dart';
|
||||
export 'platform_client.dart';
|
||||
|
||||
/// Queries an Angel server via REST.
|
||||
|
|
|
@ -3,7 +3,7 @@ library angel_client.flutter;
|
|||
|
||||
import 'dart:async';
|
||||
import 'package:http/http.dart' as http;
|
||||
import 'base_angel_client.dart';
|
||||
import 'base_platform_client.dart';
|
||||
export 'platform_client.dart';
|
||||
|
||||
/// Queries an Angel server via REST.
|
||||
|
|
|
@ -7,7 +7,7 @@ import 'package:platform_json_serializer/json_serializer.dart' as god;
|
|||
import 'package:path/path.dart' as p;
|
||||
import 'package:logging/logging.dart';
|
||||
import 'platform_client.dart';
|
||||
import 'base_angel_client.dart';
|
||||
import 'base_platform_client.dart';
|
||||
export 'platform_client.dart';
|
||||
|
||||
/// Queries an Angel server via REST.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import 'dart:async';
|
||||
import 'package:platform_client/base_angel_client.dart';
|
||||
import 'package:platform_client/base_platform_client.dart';
|
||||
import 'dart:convert';
|
||||
import 'package:http/src/base_client.dart' as http;
|
||||
import 'package:http/src/base_request.dart' as http;
|
||||
|
|
Loading…
Reference in a new issue