login_client 1.0.0 copy "login_client: ^1.0.0" to clipboard
login_client: ^1.0.0 copied to clipboard

outdated

OAuth2 compliant login client that stores credentials for the currently authenticated user and automatically refreshes tokens.

login_client #

login_client pub.dev badge

OAuth2 compliant login client that:

  • stores credentials for the currently authenticated user,
  • automatically refreshes tokens,
  • is easily pluggable into existing codebases.

Usage #

final loginClient = LoginClient(
  oAuthSettings: OAuthSettings(
    authorizationUri: apiUri.resolve('/auth'),
    clientId: 'pl.leancode.sample_app',
  ),
  credentialsStorage: const FlutterSecureCredentialsStorage(),
);

await loginClient.logIn(
  //                                       my secret pwd
  ResourceOwnerPasswordStrategy('Albert221', 'ny4ncat'),
);

final response = await loginClient.get('/secret-stuff');

Flutter #

For Flutter implementation of the CredentialsStorage, check out login_client_flutter.

18
likes
0
pub points
64%
popularity

Publisher

verified publisherleancode.co

OAuth2 compliant login client that stores credentials for the currently authenticated user and automatically refreshes tokens.

Homepage
Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

http, http_parser, meta, oauth2

More

Packages that depend on login_client