패키지, 저장소 및 앱 카테고리 검색

패키지 상세v0.0.16

desktop_webview_auth

이 패키지는 WebView를 통해 데스크톱에서 Firebase OAuth를 활성화합니다

AndroidiOSWebmacOSWindowsLinux
30일 다운로드
5.4만
좋아요
54
Pub 점수
120

패키지 설치

flutter pub add desktop_webview_auth

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

WebView를 사용하여 데스크톱 플랫폼(macOS, Windows, Linux)에서 Firebase OAuth 인증을 가능하게 하는 Flutter 패키지입니다. 앱 내부에 브라우저 창을 포함시켜 OAuth 흐름을 원활하게 처리할 수 있도록 하며, 사용자가 Firebase로 로그인하면서도 보안과 사용자 경험을 유지할 수 있습니다. 네이티브 OAuth 지원이 제한적인 데스크톱 환경에서 인증이 필요한 앱에 특히 유용합니다. 이 패키지는 Firebase Auth와 직접 통합되며 Android, iOS, 웹 및 데스크톱 운영 체제를 포함한 여러 플랫폼에서 작동합니다.

사용 사례

  • Firebase를 사용한 데스크톱 앱 인증
  • 크로스 플랫폼 데스크톱 앱에서의 OAuth 흐름
  • macOS, Windows, Linux에서 WebView를 통한 안전한 로그인
  • 데스크톱 애플리케이션에 Firebase Auth 통합
  • 데스크톱 환경에서 OAuth 리디렉션 처리

주요 기능

  • 데스크톱 플랫폼에서 Firebase OAuth 지원
  • 인증에 내장된 웹뷰를 사용합니다
  • 크로스 플랫폼 호환성
  • 보안 토큰 처리
  • Firebase Auth와의 간편한 통합
  • OAuth 리디렉션 URL을 자동으로 처리합니다

적합한 대상

  • Firebase 인증을 사용하여 데스크톱 앱을 개발하는 개발자
  • macOS, Windows 또는 Linux에서 OAuth가 필요한 앱
  • 데스크톱에서 안전하고 네이티브처럼 느껴지는 로그인 경험을 필요로 하는 프로젝트
  • 일관된 인증을 갖춘 다중 플랫폼 배포를 목표로 하는 팀
  • 신뢰할 수 있는 데스크톱 OAuth 솔루션을 찾는 Flutter 개발자

고려 사항

  • Firebase 콘솔에서 올바른 OAuth 구성이 필요합니다
  • 리디렉션 처리를 위해 사용자 지정 URL 스킴이 필요할 수 있습니다
  • Firebase Auth 통합에 제한됨
  • 데스크탑 OS에 따라 웹뷰 동작이 약간 다를 수 있습니다
  • 모바일 전용 사용 사례에는 적합하지 않습니다

원본 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

소스 저장소

이 패키지를 사용하는 프로젝트