aws-samples / amazon-cognito-passwordless-auth

Passwordless authentication with Amazon Cognito: FIDO2 (WebAuthn, support for Passkeys), Magic Link, SMS OTP Step Up
Apache License 2.0
382 stars 70 forks source link

Remove return types from getUser as they were not correct. #156

Closed fahadsadiq closed 7 months ago

fahadsadiq commented 8 months ago

Issue #, if available:

Another oversight from my side. Apologies. I have tested this end to end and it works fine.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

ottokruse commented 8 months ago

Hey mate can we instead of removing it just change the type to what it needs to be? Should be easy, can almost copy it verbatim from the docs

fahadsadiq commented 8 months ago

Done

ottokruse commented 8 months ago

Lat req, can you tweak it to this, otherwise TS might do funny and understand the lists to be fixed size:

interface GetUserResponse {
  MFAOptions: {
      AttributeName: string;
      DeliveryMedium: string;
    }[];
  PreferredMfaSetting: string;
  UserAttributes:  {
      Name: string;
      Value: string;
    }[];
  UserMFASettingList: string[];
  Username: string;
}

THANKS

fahadsadiq commented 8 months ago

Updated.

ottokruse commented 8 months ago

Hey mate you added the type to the wrong function, to revokeToken instead of getUser.

Nearly weekend my friend :)

fahadsadiq commented 7 months ago

Fixed the issue.

ottokruse commented 7 months ago

Released in https://github.com/aws-samples/amazon-cognito-passwordless-auth/releases/tag/v0.13.2