flutter_auth0_client 0.1.2
flutter_auth0_client: ^0.1.2 copied to clipboard
Auth0 Client for iOS, Android, and Web.
flutter_auth0 #
Unofficial Auth0 SDK for flutter.
Getting Started #
iOS: #
- Pod install in iOS directory
- Add the following to info.plist:
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>None</string>
<key>CFBundleURLName</key>
<string>auth0</string>
<key>CFBundleURLSchemes</key>
<array>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
</array>
</dict>
</array>
Android #
TODO
Web #
Add the following to index.html:
<script src="https://cdn.auth0.com/js/auth0-spa-js/1.12/auth0-spa-js.production.js"></script>
Note: Web only returns an access_token.
Login: #
final Auth0Credentials credentials = await FlutterAuth0.login(
clientId: "{YOUR AUTH0 CLIENT ID}",
domain: "{YOUR AUTH0 DOMAIN}",
scope: "{SCOPES}"
);
Launches popup window on web. TODO: Add redirect functionality in web
Logout: #
TODO