oauth_dio 0.2.4-beta1 copy "oauth_dio: ^0.2.4-beta1" to clipboard
oauth_dio: ^0.2.4-beta1 copied to clipboard

outdated

A customizable oauth client with token storage and interceptors for dio

example/main.dart

import 'package:oauth_dio/oauth_dio.dart';

void main() {
  final oauth = OAuth(
      clientId: 'foo',
      clientSecret: 'bar',
      tokenUrl: 'https://example.com/oauth/token');

  oauth
      .requestToken(PasswordGrant(username: 'foo', password: 'bar'))
      .then((token) {
    print('AccessToken: ${token.accessToken}');
    print('RefreshToken: ${token.refreshToken}');
    print('Expiration: ${token.expiration}');
  });
}
57
likes
0
points
772
downloads

Publisher

unverified uploader

Weekly Downloads

A customizable oauth client with token storage and interceptors for dio

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

dio, flutter

More

Packages that depend on oauth_dio