-
Notifications
You must be signed in to change notification settings - Fork 259
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(amplify_auth_cognito): password management and events #14
Conversation
...th_cognito/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/AuthCognito.kt
Outdated
Show resolved
Hide resolved
} else { | ||
when (AuthChannelEventName.valueOf(hubEvent.name)) { | ||
AuthChannelEventName.SIGNED_IN -> { | ||
var hubEvent = mapOf("eventName" to "SIGNED_IN") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure about the mapOf()
, is this statement overriding hubEvent to just have the eventName key in it? That is are we only sending the eventName to flutter and no other metadata?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I was looking at these events, they seemed to only have some sort of guid in addition to the eventName. So to start out with, I created a key value pair with just the event name under the assumption that we would eventually add additional data.
...th_cognito/android/src/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/AuthCognito.kt
Outdated
Show resolved
Hide resolved
.../main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterChangePasswordResult.kt
Outdated
Show resolved
Hide resolved
...c/main/kotlin/com/amazonaws/amplify/amplify_auth_cognito/types/FlutterResetPasswordResult.kt
Outdated
Show resolved
Hide resolved
packages/amplify_auth_cognito/ios/Classes/SwiftAuthCognito.swift
Outdated
Show resolved
Hide resolved
packages/amplify_auth_cognito/lib/event_channel_auth_cognito.dart
Outdated
Show resolved
Hide resolved
} on PlatformException catch(e) { | ||
_throwError(e); | ||
} | ||
return res; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Were you able to check if we just need a generic catch to avoid having this return?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I kept getting a complaint from the compiler, but I'm working on this in my next PR.
packages/amplify_auth_plugin_interface/lib/src/Password/PasswordOptions.dart
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks Good! 🚢 it
Description of changes:
Adds confirm, reset and change password methods, along with event channel for Hub/Auth events.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.