flutter_oauth2_client 0.0.1+1 copy "flutter_oauth2_client: ^0.0.1+1" to clipboard
flutter_oauth2_client: ^0.0.1+1 copied to clipboard

Flutter oauth2 all client

flutter_oauth2_client #

flutter oauth2 client package project.

Getting Started #

Example

      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.
3
likes
100
pub points
28%
popularity

Publisher

unverified uploader

Flutter oauth2 all client

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (LICENSE)

Dependencies

flutter, http, openid_client, url_launcher

More

Packages that depend on flutter_oauth2_client