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

Allow to use confirmUserAttribute without active session #13238

Closed
2 tasks
oemer-aran opened this issue Apr 10, 2024 · 3 comments
Closed
2 tasks

Allow to use confirmUserAttribute without active session #13238

oemer-aran opened this issue Apr 10, 2024 · 3 comments
Assignees
Labels
Auth Related to Auth components/category pending-response Issue is pending response from the issue requestor question General question

Comments

@oemer-aran
Copy link

oemer-aran commented Apr 10, 2024

Is this related to a new or existing framework?

No, it's just JavaScript.

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

When calling sendUserAttributeVerificationCode({ userAttributeKey: "email" }) it would be more ideal to verify the user without an active session. However, confirmUserAttribute expects and accessToken in the session to work.
It's usually possible to click on the button in an email to verify it, without the need to being authenticated.

Describe the solution you'd like

Instead of accessToken a username parameter should be enough to verify the email.
So instead of:

// uses accesToken internally from the current session to map it to the correct user
await confirmUserAttribute(
    userAttributeKey: 'email',
    confirmationCode:: 123456,
  );

It should work like

// doesn't need accessToken to work
await confirmUserAttribute(
    userAttributeKey: 'email',
    username: 'my@email.de'
    confirmationCode:: 123456,
  );

Describe alternatives you've considered

You could use admin actions for that, but I want to avoid it when possible.

Additional context

I am using aws-amplify only with custom JavaScript, no Hosted UI or pre-made components from amplify.

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
@oemer-aran oemer-aran added the pending-triage Issue is pending triage label Apr 10, 2024
@jimblanc jimblanc added the feature-request Request a new feature label Apr 10, 2024
@josefaidt
Copy link
Contributor

Hey @oemer-aran 👋 thanks for raising this! Can you expand on the use case you're looking to address? Are you wanting to automatically confirm email addresses on signup?

@josefaidt josefaidt added pending-response Issue is pending response from the issue requestor and removed feature-request Request a new feature labels Apr 12, 2024
@cwomack cwomack self-assigned this Apr 12, 2024
@cwomack cwomack added the Auth Related to Auth components/category label Apr 12, 2024
@josefaidt
Copy link
Contributor

Hey @oemer-aran I wanted to follow-up here and see if this is something you're still looking in to?

@cwomack
Copy link
Contributor

cwomack commented Apr 25, 2024

Closing this issue as we have not heard back from you. Please feel free to reply back and provide any information previously requested and we'd be happy to re-open the issue.

Thank you!

@cwomack cwomack closed this as not planned Won't fix, can't repro, duplicate, stale Apr 25, 2024
@cwomack cwomack added question General question and removed pending-triage Issue is pending triage labels Apr 25, 2024
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 pending-response Issue is pending response from the issue requestor question General question
Projects
None yet
Development

No branches or pull requests

4 participants