Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alvarovasconcelos/flutter_oauth2_client
Universal flutter oauth2 client
https://github.com/alvarovasconcelos/flutter_oauth2_client
flutter oauth2 oauth2-client
Last synced: about 1 month ago
JSON representation
Universal flutter oauth2 client
- Host: GitHub
- URL: https://github.com/alvarovasconcelos/flutter_oauth2_client
- Owner: AlvaroVasconcelos
- License: bsd-3-clause
- Created: 2022-04-25T21:42:51.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-05-31T06:01:27.000Z (over 2 years ago)
- Last Synced: 2024-10-16T05:34:28.618Z (3 months ago)
- Topics: flutter, oauth2, oauth2-client
- Language: Dart
- Homepage: https://pub.dev/packages/flutter_oauth2_client
- Size: 10.7 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# flutter_oauth2_client
flutter oauth2 client package project.
## Getting Started
**Example**
~~~dart
var tokenResponse = await FlutterOAuth2Client.authenticate(
uri: Uri.parse('http://localhost:8080/auth/realms/aether-passport'),
clientId: 'aether-billing',
scopes: ['email', 'profile']);print(tokenResponse.idTokenString);
//Logout:
Uri base = Uri(
scheme: Uri.base.scheme,
host: Uri.base.host,
port: Uri.base.port,
);await FlutterOAuth2Client.logout(
uri: Uri.parse('http://localhost:8080/auth/realms/aether-passport'),
idTokenString: tokenRepoponse, //mobile only
redirectString: base.toString(), //web only
);
~~~**For Web**:
1. Copy callback.html and place inside web root folder.
2. Copy logout.html and place inside web root folder.