Skip to content
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

Delivery details destination is nil in custom sign up confirm view #62

Closed
merbula opened this issue Apr 18, 2024 · 4 comments
Closed

Delivery details destination is nil in custom sign up confirm view #62

merbula opened this issue Apr 18, 2024 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@merbula
Copy link

merbula commented Apr 18, 2024

Background:

  • Using Authenticator's state machine with own custom views

Steps to reproduce this issue:

  1. Sign up with custom view. User is redirected to sign up confirmation view -> delivery details destination is available. I can get the destination value and set it in to my text.
  2. Kill the app
  3. Launch the app again
  4. Do the login -> User is redirected in to custom sign up confirmation view

I want to show text like "Activation code is sent to %@" in custom sign up confirmation view but destination is nil.

@5d 5d added the question Further information is requested label Apr 18, 2024
@5d
Copy link
Member

5d commented Apr 18, 2024

Hi @merbula, thank you for bringing this issue to our attention. We will investigate the matter and provide an update once we have gathered more details.

@ruisebas
Copy link
Member

Hi @merbula, the behaviour you described is expected and coming directly from Amplify Swift: the delivery details destination is only available during the Sign Up flow, as the code is sent during the flow.

If you attempt to Sign In a non-confirmed user, you'll be instructed to confirm the user but no new code will be sent. Since neither the Authenticator nor Amplify Swift track the state of past authentication flows, there is no details destination information available at that moment.

Having said that, the Authenticator allows you to send a new code by calling state.sendCode() in which case a new details destination information becomes available and displayed in the default view. However, it's currently not updating the value of state.deliveryDetails, which makes it inaccessible for custom views.
This is a bug and I'll work on fixing it.

@ruisebas ruisebas added bug Something isn't working and removed question Further information is requested labels Apr 18, 2024
@ruisebas ruisebas self-assigned this Apr 19, 2024
@ruisebas
Copy link
Member

This has been fixed in 1.1.2, now deliveryDetails is populated/updated when a new code is requested.

Copy link

This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants