Skip to content

Commit

Permalink
Merge pull request #18 from finkmoritz/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
finkmoritz authored May 13, 2023
2 parents cfd4cb7 + 683f68c commit 9e3eb8c
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 18 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/dart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ name: Dart

on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]

Expand All @@ -24,7 +23,7 @@ jobs:
run: dart format --output=none --set-exit-if-changed .

- name: Analyze project source
run: dart analyze
run: flutter analyze

- name: Run tests
run: flutter test
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ example/target
# Files and directories created by pub
.dart_tool/
.packages
.flutter-plugins
.flutter-plugins-dependencies

# Omit commiting pubspec.lock for library packages:
# https://dart.dev/guides/libraries/private-files#pubspeclock
Expand Down
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
## 0.1.6 (2022-09-15)
## 1.1.0 (2023-05-13)

- Use same release version as amplify_flutter package
- Added support for web platform

- ## 0.1.6 (2022-09-15)

- Fix imports in templates
- Use CognitoUserAttributeKey attributes for sign up
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ into your project.
To use this plugin, add `flutter_amplify_auth_ui` as a `dev_dependency` in your pubspec.yaml:
```
dev_dependencies:
flutter_amplify_auth_ui: ^0.1.6
flutter_amplify_auth_ui: ^1.1.0
```

Run `flutter pub get` to install the plugin.
Expand Down
1 change: 0 additions & 1 deletion analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Defines a default set of lint rules enforced for
# projects at Google. For details and rationale,
# see https://github.com/dart-lang/pedantic#enabled-lints.
include: package:pedantic/analysis_options.yaml

# For lint rules and documentation, see http://dart-lang.github.io/linter/lints.
# Uncomment to specify additional rules.
Expand Down
4 changes: 2 additions & 2 deletions lib/src/auth_config/auth_config.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class AuthConfig {
allowUnauthenticatedIdentities: json['allowUnauthenticatedIdentities'],
requiredAttributes: _getAsList(json, 'requiredAttributes'),
usernameAttributes: _getAsList(json, 'usernameAttributes'),
authProviders: _getAsList(json, 'authProviders'),
authProviders: _getAsList(json, 'authProvidersUserPool'),
mfaConfiguration: json['mfaConfiguration'],
mfaTypes: _getAsList(json, 'mfaTypes'),
);
Expand All @@ -36,7 +36,7 @@ class AuthConfig {
"allowUnauthenticatedIdentities": $allowUnauthenticatedIdentities,
"requiredAttributes": $requiredAttributes,
"usernameAttributes": $usernameAttributes,
"authProviders": $authProviders,
"authProvidersUserPool": $authProviders,
"mfaConfiguration": $mfaConfiguration,
"mfaTypes": $mfaTypes,
''';
Expand Down
2 changes: 1 addition & 1 deletion lib/src/auth_config/auth_config_reader.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class AuthConfigReader {
return File(file.path);
}
}
;

throw FlutterAmplifyAuthUiException('''
Could not find "parameters.json"!
Please check if you have already configured Amplify Auth for this project.''');
Expand Down
3 changes: 1 addition & 2 deletions lib/templates/sign_up/sign_up_page.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'package:amplify_auth_cognito/amplify_auth_cognito.dart';
import 'package:amplify_flutter/amplify_flutter.dart';
import 'package:flutter/material.dart';

Expand Down Expand Up @@ -525,7 +524,7 @@ class _SignUpPageState extends State<SignUpPage> {
username: _phoneNumberController.text.trim(),
+++END usernameAttributes[phone_number]+++*/
password: _passwordController.text.trim(),
options: CognitoSignUpOptions(
options: SignUpOptions(
userAttributes: Map<CognitoUserAttributeKey, String>.from({
/*+++START requiredAttributes[email]+++*/
CognitoUserAttributeKey.email: _emailController.text.trim(),
Expand Down
16 changes: 8 additions & 8 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
name: flutter_amplify_auth_ui
description: Flutter plugin that automatically generates authentication widget templates based on your Amplify CLI Authentication configuration.
version: 0.1.6
version: 1.1.0
homepage: https://github.com/finkmoritz/flutter_amplify_auth_ui
repository: https://github.com/finkmoritz/flutter_amplify_auth_ui
issue_tracker: https://github.com/finkmoritz/flutter_amplify_auth_ui/issues
documentation: https://github.com/finkmoritz/flutter_amplify_auth_ui/blob/main/README.md

environment:
sdk: '>=2.12.3 <3.0.0'
flutter: '>=2.8.0'
sdk: ">=3.0.0 <4.0.0"
flutter: '>=3.10.0'

dependencies:
flutter:
sdk: flutter

amplify_flutter: '>=0.6.0 <1.0.0'
amplify_auth_cognito: '>=0.6.0 <1.0.0'
path: ^1.8.0
amplify_flutter: ^1.1.0
amplify_auth_cognito: ^1.1.0
path: ^1.8.3

dev_dependencies:
pedantic: ^1.9.0
test: ^1.14.4
lints: ^2.1.0
test: ^1.24.2

0 comments on commit 9e3eb8c

Please sign in to comment.