Buscar pacotes, repositórios e categorias de apps

Detalhes do pacotev2.27.3

gotrue

Uma biblioteca cliente Dart para a API GoTrue.

AndroidiOSWebmacOSWindowsLinux
Downloads em 30 dias
1,3 mi
Curtidas
16
Pontos Pub
140

Instalar pacote

flutter pub add gotrue

Visão geral do pacote

Orientação gerada a partir de informações públicas. Apenas para referência.

Uma biblioteca cliente Dart para interagir com a API de autenticação GoTrue, permitindo gerenciamento seguro de usuários em aplicativos Flutter. Suporta registro, login, recuperação de senha e gerenciamento de sessão com gerenciamento integrado de tokens. Projetada para integração perfeita com o Supabase, oferece uma experiência consistente de autenticação em múltiplas plataformas. A biblioteca gerencia a persistência de estado e fornece atualizações em tempo real por meio de ouvintes. Ideal para desenvolvedores que precisam de autenticação robusta e escalonável.

Casos de uso

  • Registro e login do usuário
  • Fluxos de trabalho de redefinição de senha
  • Gerenciamento de sessão
  • Atualizações em tempo real do estado de autenticação
  • Autenticação multiplataforma

Principais recursos

  • Manuseio seguro de token
  • Persistência de sessão embutida
  • ouvintes de autenticação em tempo real
  • Suporte para login com e-mail/senha e login social
  • Compatibilidade multiplataforma

Indicado para

  • Aplicativos Flutter usando o Supabase
  • Aplicativos que precisam de autenticação segura
  • Desenvolvedores construindo aplicativos multiplataforma
  • Projetos que exigem estado de autenticação em tempo real
  • Equipes que desejam configuração simples de autenticação

Considerações

  • Requer um backend GoTrue (por exemplo, Supabase)
  • Limitado a recursos específicos do GoTrue
  • Necessita de tratamento adequado de erros para problemas de rede
  • O fluxo de autenticação deve ser personalizado para a UI
  • Dependente do ecossistema Supabase

README original

Snapshot do README original do repositório-fonte vinculado. Consulte o repositório para o conteúdo mais recente.


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

Categorias

Dependências

Lista de dependências 8 itens

Repositório-fonte

Projetos que usam este pacote

Ainda não há dados.