Search packages, repositories and app categories

Package detailsv0.0.9

auth0_web_flutter

A Flutter package to easily integrate Auth0 into Web Flutter apps.

30-day downloads
295
Likes
3
Pub points
60

Install package

flutter pub add auth0_web_flutter

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

A Flutter package designed to simplify the integration of Auth0 authentication into web-based Flutter applications. It provides a streamlined interface for handling user login, logout, and token management within web environments. The package leverages Auth0's robust identity platform to enable secure, scalable authentication with minimal setup. It is tailored specifically for web platforms, ensuring compatibility with browser-based workflows and OAuth2 protocols. Developers can quickly implement secure sign-in flows using Auth0’s customizable login pages and social provider support.

Use cases

  • Web app authentication
  • User login/logout flows
  • Secure token management
  • Single sign-on integration
  • Social login implementation

Key features

  • Auth0 integration for web
  • OAuth2 support
  • Token handling
  • Customizable login UI
  • Browser-compatible

Suitable for

  • Flutter web developers
  • Applications requiring secure authentication
  • Projects using Auth0 identity platform
  • Web apps with social logins
  • Teams prioritizing rapid auth implementation

Considerations

  • Requires Auth0 account setup
  • Limited to web platform
  • Dependent on Auth0 service availability
  • Needs proper domain configuration in Auth0 dashboard
  • May require additional frontend customization for advanced use cases

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

A Flutter package to easily integrate Auth0 into Web Flutter apps.

Platform Support

Android iOS MacOS Web Linux Windows
x x x ✔️ x x

Auth0FlutterWeb is supported for web only.

Features

Integrate Auth0 authentication across web Flutter apps. Registration and Login users, logout users, and identify currently authenticated users across web.

Usage

To use this plugin, add auth0_flutter2 as a dependency in your pubspec.yaml file.

Web

Add the Auth0 Javascript SPA (Single Page Application) library.

<script src="https://cdn.auth0.com/js/auth0-spa-js/1.13/auth0-spa-js.production.js"></script>

Example

Import the library.

import 'package:auth0_flutter2/auth0_flutter2.dart';

Then initialize the Auth0FlutterWeb class in your main() method.

void main() {
  // add the auth0domain
  Auth0FlutterWeb.auth0Domain = "AUTH0_DOMAIN";
  //add the auth0ClientID
  Auth0FlutterWeb.auth0ClientId = "AUTH0_CLIENT_ID";
// add the redirect uri
  Auth0FlutterWeb.redirectUri = "YOUR_APP_REDIRECT_URI";
  

  // Set the URL strategy for our web app. Removes 
  // trailing hash(#) to ensure login callbacks
  // will be captured and processed correctly.
  Auth0FlutterWeb.setPathUrlStrategy();

  runApp(const MyApp());
}

Then invoke the class methods anywhere in your Dart code.

Auth0FlutterWeb.instance.userAuthentication(screenHint: "signup");
Auth0FlutterWeb.instance.userAuthentication(screenHint: "login");
Auth0FlutterWeb.instance.logoutUser();
Auth0FlutterWeb.instance.getLoggedInUserId();

Categories

Dependencies

Dependency list 4 items

Source repository

Projects using this package

No data available yet.