aws-amplify / docs

AWS Amplify Framework Documentation
https://docs.amplify.aws
Apache License 2.0
482 stars 1.04k forks source link

[Feedback] Provided Example for Authorization does not provide package or version specifications #4514

Closed alexthemitchell closed 1 year ago

alexthemitchell commented 2 years ago

Page: /lib/auth/delete_user/q/platform/[platform]

Feedback:

The function on this page uses Auth.deleteUser(); when importing as provided in previous examples, Auth.deleteUser does not appear to be a function for aws-amplify 4.3.12 .

import { Auth } from 'aws-amplify';
TypeError: _awsAmplify.Auth.deleteUser is not a function

It seems that this example expects that we have imported @aws-amplify/auth

import Auth from '@aws-amplify/auth';

Then the provided example returns a Promise<string | void> that resolves to SUCCESS as expected.

nadetastic commented 1 year ago

Hi @alexthemitchell 👋

This issue was specific to aws-amplify 4.3.12 and the current version should work without generating this error. Closing this out for now, but let me know if you have any questions/comments.