पैकेज, रिपॉज़िटरी और ऐप श्रेणियाँ खोजें

पैकेज विवरणv0.0.16

desktop_webview_auth

इस पैकेज के माध्यम से वेबव्यू के माध्यम से डेस्कटॉप पर Firebase OAuth सक्षम होता है

AndroidiOSWebmacOSWindowsLinux
30-दिन डाउनलोड
53.8 हज़ार
लाइक
54
Pub अंक
120

पैकेज इंस्टॉल करें

flutter pub add desktop_webview_auth

पैकेज अवलोकन

सार्वजनिक जानकारी से बना चयन मार्गदर्शन। केवल संदर्भ हेतु।

एक फ्लटर पैकेज जो मैकओएस, विंडोज, लिनक्स जैसे डेस्कटॉप प्लेटफॉर्म पर वेबव्यू का उपयोग करके फायरबेस ओएथ प्रमाणीकरण सक्षम करता है। यह एप्लिकेशन के भीतर एक ब्राउज़र विंडो एम्बेड करके ओएथ फ्लो को हैंडल करने का एक निरंतर तरीका प्रदान करता है, जिससे उपयोगकर्ता फायरबेस के साथ साइन-इन कर सकते हैं और सुरक्षा और उपयोगकर्ता अनुभव को बनाए रखते हैं। यह पैकेज विशेष रूप से उन ऐप्स के लिए उपयोगी है जिनमें डेस्कटॉप वातावरण में प्रमाणीकरण की आवश्यकता होती है, जहां मूल ओएथ समर्थन सीमित हो सकता है। यह फायरबेस ऑथ के साथ सीधे एकीकृत होता है और एंड्रॉइड, आईओएस, वेब और डेस्कटॉप ऑपरेटिंग सिस्टम सहित कई प्लेटफॉर्मों पर काम करता है।

उपयोग

  • Firebase के साथ डेस्कटॉप ऐप प्रमाणीकरण
  • क्रॉस-प्लेटफॉर्म डेस्कटॉप ऐप्स में OAuth फ्लो
  • macOS, Windows और Linux पर WebView के माध्यम से सुरक्षित लॉगिन
  • डेस्कटॉप एप्लिकेशन में Firebase Auth को एकीकृत करना
  • डेस्कटॉप वातावरण में OAuth पुनर्निर्देशन का प्रबंधन

मुख्य विशेषताएँ

  • डेस्कटॉप प्लेटफॉर्म पर Firebase OAuth का समर्थन करता है
  • प्रमाणीकरण के लिए एम्बेडेड वेबव्यू का उपयोग करता है
  • प्लेटफॉर्म के अनुकूलता
  • सुरक्षित τोकन संचालन
  • Firebase Auth के साथ सरल एकीकरण
  • ऑथ रीडायरेक्ट यूआरएल को स्वचालित रूप से संभालता है

इनके लिए उपयुक्त

  • Firebase प्रमाणीकरण के साथ डेस्कटॉप एप्लिकेशन बनाने वाले विकासकर्मी
  • macOS, Windows या Linux पर OAuth की आवश्यकता वाले ऐप्स
  • डेस्कटॉप पर सुरक्षित, नेटिव-जैसा लॉगिन अनुभव की आवश्यकता वाले प्रोजेक्ट
  • एक समान प्रमाणीकरण के साथ बहु-प्लेटफॉर्म डिप्लॉयमेंट का लक्ष्य निर्धारित करने वाली टीमें
  • विश्वसनीय डेस्कटॉप OAuth समाधान की तलाश में Flutter विकासकर्ता

विचार योग्य बातें

  • Firebase कंसोल में सही OAuth कॉन्फ़िगरेशन की आवश्यकता है
  • पुनर्निर्देशन के प्रबंधन के लिए कस्टम URL योजनाओं की आवश्यकता हो सकती है
  • Firebase Auth एकीकरण पर सीमित
  • डेस्कटॉप ओएस पर वेबव्यू व्यवहार में हल्के अंतर हो सकते हैं
  • मोबाइल-केवल उपयोग के मामलों के लिए उपयुक्त नहीं

मूल README

संबंधित सोर्स रिपॉज़िटरी के मूल README का स्नैपशॉट। नवीनतम सामग्री के लिए रिपॉज़िटरी देखें।

Desktop webview auth

Chat on Discord

This package enables Firebase OAuth on desktop platforms via webview

⚠️ Maintenance status: not actively maintained

This package was built to fill a gap: OAuth sign-in flows for Flutter desktop apps, at a time when the official Firebase solutions had no desktop support.

It still works, and for some use cases it remains the nicest desktop OAuth experience available — but it is not integrated with the wider FlutterFire ecosystem, and Invertase is no longer actively developing it. We will keep the repository public and accept the occasional community PR, but there is no guaranteed maintenance, no roadmap, and no support commitment. Issues may go unanswered.

It's kept public because it's still useful as-is, and because it's a solid starting point for anyone wanting to build a pure-Dart auth implementation. If you depend on it, please pin your version and be prepared to fork.

Supported providers:

  • Google
  • Facebook
  • Twitter

Installation

macOS setup

The recaptcha verification flow is done on the local server, and it requires that the app has the following in the Release.entitlements:

<key>com.apple.security.network.server</key>
<true/>
Linux setup

To display webview on Linux, WebKit2GTK development libraries are used, if you don't have it already installed:

Ubuntu:

apt install libwebkit2gtk-4.0-dev

Fedora:

dnf install webkit2gtk3-devel

Additionally, if Flutter is installed using snap, you might face issues compiling the app, to fix you would need to uninstall the snap version and install Flutter manually on Linux.

Windows setup

Make sure you are on latest stable channle of Flutter, and have installed the requirements as mentioned here.

Nothing extra is needed to get started on Windows.

Add dependency
flutter pub add desktop_webview_auth
Imports
import 'package:desktop_webview_auth/desktop_webview_auth.dart';
import 'package:desktop_webview_auth/google.dart';
import 'package:desktop_webview_auth/facebook.dart';
import 'package:desktop_webview_auth/twitter.dart';

Usage

  • Configure OAuth providers in firebase console
  • Create an instance of ProviderArgs
final googleSignInArgs = GoogleSignInArgs(
  clientId:
    '448618578101-sg12d2qin42cpr00f8b0gehs5s7inm0v.apps.googleusercontent.com',
  redirectUri:
    'https://react-native-firebase-testing.firebaseapp.com/__/auth/handler',
  scope: 'email',
)
  • call DesktopWebviewAuth.signIn
try {
    final result = await DesktopWebviewAuth.signIn(args);

    print(result?.accessToken);
    print(result?.tokenSecret);
} catch (err) {
    // something went wrong
}
  • create an instance of OAuthCredential and sign in
import 'package:firebase_auth/firebase_auth.dart';

final credential = GoogleAuthProvider.credential(accessToken: result.accessToken)

FirebaseAuth.instance.signInWithCredential(credential);

श्रेणियाँ

निर्भरताएँ

निर्भरता सूची 3 आइटम

  • crypto^3.0.3
  • http^1.0.0
  • plugin_platform_interface^2.1.4

सोर्स रिपॉज़िटरी

इस पैकेज का उपयोग करने वाले प्रोजेक्ट