oauth_dio 0.2.9 copy "oauth_dio: ^0.2.9" to clipboard
oauth_dio: ^0.2.9 copied to clipboard

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}');
  });
}
55
likes
130
pub points
82%
popularity

Publisher

unverified uploader

A customizable oauth client with token storage and interceptors for dio

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

dio

More

Packages that depend on oauth_dio