Updated auth_oauth2
This commit is contained in:
parent
f70f090e7b
commit
340d8a926d
4 changed files with 12 additions and 7 deletions
packages/auth_oauth2
|
@ -1,5 +1,9 @@
|
||||||
# Change Log
|
# Change Log
|
||||||
|
|
||||||
|
## 4.0.2
|
||||||
|
|
||||||
|
* Updated example
|
||||||
|
|
||||||
## 4.0.1
|
## 4.0.1
|
||||||
|
|
||||||
* Updated README
|
* Updated README
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# Angel3 OAuth2 Handler
|
# Angel3 OAuth2 Handler
|
||||||
|
|
||||||
[](https://pub.dartlang.org/packages/angel3_auth_oauth2)
|
[](https://pub.dartlang.org/packages/angel3_auth_oauth2)
|
||||||
[](https://dart.dev/null-safety)
|
[](https://dart.dev/null-safety)
|
||||||
[](https://gitter.im/angel_dart/discussion)
|
[](https://gitter.im/angel_dart/discussion)
|
||||||
|
|
||||||
|
|
|
@ -47,11 +47,12 @@ void main() async {
|
||||||
var mappedUserService = userService.map(User.parse, User.serialize);
|
var mappedUserService = userService.map(User.parse, User.serialize);
|
||||||
|
|
||||||
// Set up the authenticator plugin.
|
// Set up the authenticator plugin.
|
||||||
var auth =
|
var auth = AngelAuth<User>(
|
||||||
AngelAuth<User>(jwtKey: 'oauth2 example secret', allowCookie: false);
|
serializer: (user) async => user.id,
|
||||||
auth.serializer = (user) async => user.id;
|
deserializer: (id) => mappedUserService.read(id.toString()),
|
||||||
auth.deserializer = (id) => mappedUserService.read(id.toString());
|
jwtKey: 'oauth2 example secret',
|
||||||
app.fallback(auth.decodeJwt);
|
allowCookie: false);
|
||||||
|
await app.configure(auth.configureServer);
|
||||||
|
|
||||||
/// Create an instance of the strategy class.
|
/// Create an instance of the strategy class.
|
||||||
auth.strategies['github'] = OAuth2Strategy(
|
auth.strategies['github'] = OAuth2Strategy(
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
name: angel3_auth_oauth2
|
name: angel3_auth_oauth2
|
||||||
version: 4.0.1
|
version: 4.0.2
|
||||||
description: Angel3 library for authenticating users with external identity providers via OAuth2.
|
description: Angel3 library for authenticating users with external identity providers via OAuth2.
|
||||||
homepage: https://angel3-framework.web.app/
|
homepage: https://angel3-framework.web.app/
|
||||||
repository: https://github.com/dukefirehawk/angel/tree/angel3/packages/auth_oauth2
|
repository: https://github.com/dukefirehawk/angel/tree/angel3/packages/auth_oauth2
|
||||||
|
|
Loading…
Reference in a new issue