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

description: A reusable Flutter widget for OAuth authentication with providers like Google, Microsoft, and more.

Custom Login Widget #

A reusable Flutter widget for OAuth 2.0 authentication that can be plugged into different projects. This widget allows seamless integration with OAuth providers like Google, Microsoft, and others.


Features #

  • Supports OAuth 2.0 flows (Authorization Code Grant).
  • Customizable configuration for client ID, redirect URI, and OAuth endpoints.
  • Handles OAuth token exchange and authorization flow.
  • Easy-to-use plug-and-play widget.

Installation #

Add the following dependency in your pubspec.yaml:

dependencies:
  custom_login_widget: ^1.0.0
import 'package:custom_login_widget/custom_login_widget.dart';
CustomLoginWidget(
  clientId: 'YOUR_CLIENT_ID',
  redirectUri: 'YOUR_REDIRECT_URI',
  authorizationEndpoint: 'https://accounts.google.com/o/oauth2/v2/auth',
  tokenEndpoint: 'https://oauth2.googleapis.com/token',
  scopes: ['openid', 'profile', 'email'],
  onLoginSuccess: (accessToken) {
    print('Access Token: $accessToken');
  },
  onLoginError: (error) {
    print('Login Error: $error');
  },
);
0
likes
130
points
14
downloads

Publisher

unverified uploader

Weekly Downloads

description: A reusable Flutter widget for OAuth authentication with providers like Google, Microsoft, and more.

Homepage

Documentation

API reference

License

MIT (license)

Dependencies

flutter, flutter_webview_plugin, http

More

Packages that depend on custom_login_widget