Update README.md

This commit is contained in:
Tobe O 2017-04-12 08:03:31 -04:00 committed by GitHub
parent 03f7ad1db0
commit e4bcd3cb47

View file

@ -20,3 +20,11 @@ in this package.
```dart
auth.authenticate('facebook', new AngelAuthOptions(callback: confirmPopupAuthentication()));
```
This renders a simple HTML page that fires the user's JWT as a `token` event in `window.opener`.
`angel_client` [exposes this as a Stream](https://github.com/angel-dart/client#authentication):
```dart
app.authenticateViaPopup('/auth/google').listen((jwt) {
// Do something with the JWT
});
```