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

custom attributes not works react amplify #13895

Closed
3 tasks done
gonzabt3 opened this issue Oct 8, 2024 · 2 comments
Closed
3 tasks done

custom attributes not works react amplify #13895

gonzabt3 opened this issue Oct 8, 2024 · 2 comments
Assignees
Labels
Auth Related to Auth components/category question General question

Comments

@gonzabt3
Copy link

gonzabt3 commented Oct 8, 2024

Before opening, please confirm:

JavaScript Framework

React

Amplify APIs

Authentication

Amplify Version

v6

Amplify Categories

auth

Backend

Amplify Gen 2 (Preview)

Environment information

# Put output below this line


Describe the bug

I am trying to define custom attributes but I have and error of typescript.I followed the official documentation


ERROR:
TypeScript validation check failed.
Resolution: Fix the syntax and type errors in your backend definition.

`import { defineAuth } from '@aws-amplify/backend';

/**
 * Define and configure your auth resource
 * @see https://docs.amplify.aws/gen2/build-a-backend/auth
 */
export const auth = defineAuth({
  loginWith: {
    email: true,
  },    
  userAttributes: {
    "custom:payed": {
      dataType: "Boolean",
      mutable: true,
    },
    "custom:is_trial_user": {
      dataType: "Boolean",
      mutable: true,
    },
    "custom:start_free_trial_date": {
      dataType: "DateTime",
      mutable: true,
    },
    "custom:end_free_trial_date": {
      dataType: "DateTime",
      mutable: true,
    },
  },
});`

Expected behavior

following the docs I need to add the prefix custom,

Reproduction steps

npm amps sandbox

Code Snippet

// Put your code below this line.



### Log output

<details>

// Put your logs below this line


</details>


### aws-exports.js

_No response_

### Manual configuration

_No response_

### Additional configuration

_No response_

### Mobile Device

_No response_

### Mobile Operating System

_No response_

### Mobile Browser

_No response_

### Mobile Browser Version

_No response_

### Additional information and screenshots

_No response_
@github-actions github-actions bot added pending-triage Issue is pending triage pending-maintainer-response Issue is pending a response from the Amplify team. labels Oct 8, 2024
@cwomack cwomack self-assigned this Oct 8, 2024
@cwomack cwomack added the Auth Related to Auth components/category label Oct 8, 2024
@cwomack
Copy link
Member

cwomack commented Oct 8, 2024

Hello, @gonzabt3 and sorry to hear you're running into this issue. To better understand how you got here, can you clarify if you've already followed either our Quickstart Guide or the manual installation steps to set up your app? If so, can you share what you have in your package.json so we can see the dependencies? Thanks!

@github-actions github-actions bot removed the pending-maintainer-response Issue is pending a response from the Amplify team. label Oct 8, 2024
@cwomack cwomack added question General question pending-community-response Issue is pending a response from the author or community. and removed pending-triage Issue is pending triage labels Oct 8, 2024
@cwomack
Copy link
Member

cwomack commented Oct 22, 2024

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

If there's further questions or issues with setting up the backend in the Gen 2 Developer Experience, please also review the existing issues (or open a new one) on the amplify-backend repository (here).

Thank you!

@cwomack cwomack closed this as not planned Won't fix, can't repro, duplicate, stale Oct 22, 2024
@github-actions github-actions bot removed the pending-community-response Issue is pending a response from the author or community. label Oct 22, 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 question General question
Projects
None yet
Development

No branches or pull requests

2 participants