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

signIn in v6 does not expose the active signInSession #12639

Open
2 tasks
martingrzzler opened this issue Nov 28, 2023 · 7 comments
Open
2 tasks

signIn in v6 does not expose the active signInSession #12639

martingrzzler opened this issue Nov 28, 2023 · 7 comments
Assignees
Labels
Auth Related to Auth components/category feature-request Request a new feature V6 V6 of Amplify JS

Comments

@martingrzzler
Copy link

martingrzzler commented Nov 28, 2023

Is this related to a new or existing framework?

No response

Is this related to a new or existing API?

Authentication

Is this related to another service?

No response

Describe the feature you'd like to request

Auth.signIn used to return a CognitoUser with a Session which could be stored and persisted such that one could continue a login session in a different browser tab by recreating the CognitoUser with the persisted session and calling Auth.sendCustomChallengeAnswer(cognitoUser, answer). In v6 this is no longer possible since the signInSession is handled internally.

I need this feature in order to implement magic sign-in links as described in this blog post:
https://aws.amazon.com/blogs/mobile/implementing-passwordless-email-authentication-with-amazon-cognito/

Describe the solution you'd like

Is there a workaround in v6 that allows to set the signInSession of the signInStore in order to continue the session in a different browser tab?

Describe alternatives you've considered

Downgrade to v5

Additional context

No response

Is this something that you'd be interested in working on?

  • 👋 I may be able to implement this feature request
  • ⚠️ This feature might incur a breaking change
@martingrzzler martingrzzler added the pending-triage Issue is pending triage label Nov 28, 2023
@nadetastic nadetastic added the Auth Related to Auth components/category label Nov 28, 2023
@bodokaiser
Copy link

Here are at least two more users having the same problem

@nadetastic nadetastic self-assigned this Nov 28, 2023
@nadetastic nadetastic added the feature-request Request a new feature label Nov 28, 2023
@david-mcafee david-mcafee added the V6 V6 of Amplify JS label Nov 28, 2023
@nadetastic
Copy link
Contributor

Hi @martingrzzler, thank you for opening this issue. This functionality has indeed changed in V6, however the dev team will be reviewing this use case and will follow up soon. In the meantime, I have marked this as a feature request. Let me know if you have additional questions.

@bodokaiser
Copy link

@nadetastic Maybe a more general solution to the problem is a Storage interface as used in v5? This would also re-enable the use of authenticated chrome extensions, which overwrote the Storage interface to sync the localStorage of the browser with the chrome.storage.local of the extension.

@nadetastic nadetastic removed the pending-triage Issue is pending triage label Nov 29, 2023
@bodokaiser
Copy link

Any updates?

@ajkpersonal
Copy link

I'm trying to implement sign-in with magic links and this issue seems to make it impossible to implement in v6 since the link sent to and email gets opened in a new tab. Will update here if I find a workaround, but this seems super important if it prevents such a common sign in pattern.

@awadhwanan
Copy link

BUMP @nadetastic Is there any update on this?

@israx
Copy link
Contributor

israx commented May 9, 2024

Hello everyone, apologies for the delayed response. We are actively working on this feature and will notify with any updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auth Related to Auth components/category feature-request Request a new feature V6 V6 of Amplify JS
Projects
None yet
Development

No branches or pull requests

7 participants