Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/anthonychwong/auth0-flutter-web
Wrapper of Auth0 SPA SDK for Flutter Web
https://github.com/anthonychwong/auth0-flutter-web
auth0 auth0-spa-js dart
Last synced: 4 months ago
JSON representation
Wrapper of Auth0 SPA SDK for Flutter Web
- Host: GitHub
- URL: https://github.com/anthonychwong/auth0-flutter-web
- Owner: anthonychwong
- License: bsd-3-clause
- Created: 2021-02-13T03:16:44.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-05-11T11:28:49.000Z (over 2 years ago)
- Last Synced: 2024-09-28T23:21:12.444Z (4 months ago)
- Topics: auth0, auth0-spa-js, dart
- Language: Dart
- Homepage:
- Size: 43.9 KB
- Stars: 8
- Watchers: 2
- Forks: 11
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Auth0 Flutter Web
A wrapper for Auth0 SPA SDK to use Auth0 in Flutter Web.
> ⚠ The latest is [`0.0.1-alpha.6`](https://pub.dev/packages/auth0_flutter_web/versions/0.0.1-alpha.6) but not serve by `pub.dev` by default.
[![](https://img.shields.io/pub/v/auth0_flutter_web)](https://pub.dev/packages/auth0_flutter_web)
## How to use
### 1. Add dependency
```yaml
dependencies:
auth0_flutter_web:
```### 2. Load Auth0 SPA SDK in `index.html`
Make Auth0 SPA SDK available for dart by adding it to `index.html` in `web` folder (besides `ios` and `android`)```HTML
```### 3. Use `Auth0` in dart code
```dart
import 'package:auth0_flutter_web/auth0_flutter_web.dart';Auth0 auth0 = await createAuth0Client(
Auth0CreateOptions(
domain: '-- domain of the universal login page --',
client_id: '-- id of your app --',
)
);String token = await auth0.getTokenWithPopup();
```## Example
Complete source code of working example can be found in `example` folder under repository `root`