native_oauth2 0.0.1 copy "native_oauth2: ^0.0.1" to clipboard
native_oauth2: ^0.0.1 copied to clipboard

outdated

A Flutter plugin for authenticating with OAuth 2.0 providers using native platform APIs.

native_oauth2 #

A Flutter plugin for authenticating with OAuth 2.0 providers using native platform APIs.

This package provides a simple interface for authenticating with OAuth 2.0 providers on both iOS (using SFWebAuthentication) and Android (using Chrome Custom Tabs).

Installation #

Add native_oauth2 as a dependency in your pubspec.yaml file

dependencies:
  native_oauth2: ^0.0.1

Then run flutter pub get to install

Usage #

Authenticate with an arbitrary OAuth 2.0 provider:

import 'package:native_oauth2/native_oauth2.dart';

void login() async {
  final plugin = NativeOAuth2();

  final provider = OAuthProvider(
    authUrlAuthority: authority,
    authUrlPath: path,
    clientId: clientId,
  );

  final result = await plugin.authenticate(
    provider: provider,
    redirectUri: Uri.parse('custom-scheme://custom/path'),
    scope: ['openid', 'Some.Other.Scope'],
  );
}
0
likes
0
points
7
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter plugin for authenticating with OAuth 2.0 providers using native platform APIs.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on native_oauth2

Packages that implement native_oauth2