분류, 패키지 및 저장소 검색

패키지 상세v2.27.3

gotrue

GoTrue API용 Dart 클라이언트 라이브러리입니다.

AndroidiOSWebmacOSWindowsLinux
30일 다운로드
135만
좋아요
16
Pub 점수
140

패키지 설치

flutter pub add gotrue

패키지 개요

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

GoTrue 인증 API와 상호 작용하기 위한 Dart 클라이언트 라이브러리로, Flutter 애플리케이션에서 사용자 관리를 안전하게 가능하게 합니다. 회원가입, 로그인, 비밀번호 복구 및 세션 처리를 지원하며 내장된 토큰 관리 기능을 제공합니다. Supabase와의 원활한 통합을 위해 설계되어 여러 플랫폼에서 일관된 인증 경험을 제공합니다. 상태 지속성과 리스너를 통한 실시간 업데이트를 처리합니다. 강력하고 확장 가능한 인증 기능이 필요한 앱 개발에 이상적입니다.

사용 사례

  • 사용자 등록 및 로그인
  • 비밀번호 재설정 워크플로우
  • 세션 관리
  • 실시간 인증 상태 업데이트
  • 다중 플랫폼 인증

주요 기능

  • 보안 토큰 처리
  • 내장 세션 지속성
  • 실시간 인증 리스너
  • 이메일/비밀번호 및 소셜 로그인 지원
  • 크로스 플랫폼 호환성

적합한 대상

  • Supabase를 사용하는 Flutter 앱
  • 보안 인증이 필요한 앱
  • 다중 플랫폼 앱을 개발하는 개발자
  • 실시간 인증 상태가 필요한 프로젝트
  • 간단한 인증 설정을 원하는 팀

고려 사항

  • GoTrue 백엔드(예: Supabase)가 필요합니다
  • GoTrue 전용 기능에 제한됨
  • 네트워크 문제에 대한 적절한 오류 처리가 필요합니다
  • 인증 흐름은 UI에 맞게 사용자 지정되어야 합니다
  • Supabase 생태계에 의존

원본 README

연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.


Supabase Logo

Supabase Flutter

Flutter client library for Supabase.

Guides · Reference Docs · Migration Guides

Build Package License: MIT

Run locally

This repo is a monorepo powered by Melos containing supabase_flutter and its sub-libraries. All packages are located in the packages directory.

To install on a locally developed app:

  • Clone this repo
  • Install Melos globally if you haven't already: dart pub global activate melos
  • Run melos bootstrap or melos bs at the root of the cloned directory to install dependencies
  • Add the target package to your pubspec.yaml file specifying the path.
    supabase_flutter:
      path: <your-path-to-the-local-supabase-flutter-repo>/packages/supabase_flutter
    

Testing your app

The helpers the test suites of these packages run on are published in package:supabase_test, so your tests can build on the same primitives: mock HTTP clients, JWT builders, auth session fixtures and realtime frames. Add the package as a dev dependency:

dev_dependencies:
  supabase_test: ^0.1.0

Then stub the endpoints the code under test talks to and run it against a real SupabaseClient, with no running stack required:

final httpClient = MockSupabaseHttpClient()
  ..stubTable('todos', rows: [
    {'id': 1, 'task': 'Ship it', 'status': false},
  ]);
final supabase = testSupabaseClient(httpClient: httpClient);
addTearDown(supabase.dispose);

final todos = await supabase.from('todos').select();
expect(todos, hasLength(1));

See the supabase_test README for the full guide: stubbing database, rpc, edge function and auth endpoints, asserting on recorded requests, running tests as a signed-in user, and wiring Supabase.initialize in Flutter widget tests.

Testing this repo

The tests for the packages postgrest, supabase_auth, supabase_realtime and supabase_storage run against a local Supabase stack. To run these tests locally you need docker and the Supabase CLI installed.

The single configuration for the stack lives in the supabase directory at the repository root. Start it with:

supabase start

Run the Dart tests within the package directory in packages/<package> with the following command. The -j 1 flag runs the tests not concurrently, which works better since the tests run against the same services.

dart test -j 1

To stop the stack run the following command from the repository root:

supabase stop

Contributing

  • Fork the repo on GitHub
  • Clone the project to your own machine
  • Commit changes to your own branch
  • Push your work back up to your fork
  • Submit a Pull request so that we can review your changes and merge

License

This repo is licensed under MIT.

Resources

카테고리

의존성

의존성 목록 8 개

소스 저장소

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

아직 데이터가 없습니다.