oauth2_dio

Last updated:

0 purchases

oauth2_dio Image
oauth2_dio Images
Add to Cart

Description:

oauth2 dio

oauth2_dio #
Implement #
1, OAuthInfoMixin #
Object hold info (token, refreshToken) is a mixin of OAuthInfoMixin
2, Create Oauth2Interceptor #
_oauth2manager = Oauth2Manager<SignInResponse>(
currentValue: token,
onSave: (value) {
//TODO Save token to SharePreference
});

_dio.interceptors.add(
Oauth2Interceptor(
dio: _dio,
oauth2Dio:
Dio(BaseOptions(baseUrl: 'http://abc.xyz/api/')),
pathRefreshToken: 'auth/refreshToken',
parserJson: (json) {
//TODO Parser json to object which a mixin of OAuthInfoMixin
},
tokenProvider: _oauth2manager,
),
);
copied to clipboard

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.