Expose onForgotPassword [SDK-2632] #673
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes
This PR exposes in the public API the
onForgotPassword
callback that was implemented and had unit tests, but could not be used as there was no public API for it.Implementation
Lock.swift/Lock/ObserverStore.swift
Line 60 in a13bb76
Unit tests
https://github.com/auth0/Lock.swift/blob/master/LockTests/Models/ObserverStoreSpec.swift#L79
https://github.com/auth0/Lock.swift/blob/master/LockTests/Models/ObserverStoreSpec.swift#L149
https://github.com/auth0/Lock.swift/blob/master/LockTests/Models/ObserverStoreSpec.swift#L154
https://github.com/auth0/Lock.swift/blob/master/LockTests/Models/ObserverStoreSpec.swift#L163
Screen.Recording.2021-07-01.at.20.51.08.mov
References
Fixes #666
Lock.Android exposes a
RESET_PASSWORD
event: https://github.com/auth0/Lock.Android/blob/main/lib/src/main/java/com/auth0/android/lock/LockCallback.java#L56Testing
The callback has unit tests, but it was also tested manually using an iPhone simulator. A unit test covering the new public API method was also added.
Checklist