Closed augustgaukstad closed 6 months ago
Looks like the type expects id: string | number
which doesn't error
-interface User {}
+interface User { id: string | number }
Thanks! That did the trick.
I'm trying to follow the contribution guide from the readme, but don't seem to have access to push to this repo. VSCode suggests creating a fork and pushing to that, is that the correct workflow? First time contributing to someone else's repo, sorry for the noobyness :)
Edit: i did create a new branch for the feature btw, assumed that would be best practice
Congrats on your first contribution (in progress) 😛
Yes, typically one follows these steps:
Another tip: you can write "Resolve #22" in the PR message, which will tell Github to close this issue after the PR is merged.
I have a case where I would love it if my Payload-users get updated data when they sign in.
Currently got a flow for this working locally like this:
The
info
contains up to date data fetched through the authorization flow.Tried cloning the repo and replicating my code, but getting a type-error on this line:
id: user.id
Error:
Property 'id' does not exist on type 'User & { collection?: any; _strategy?: any; }'.
Guessing it's because there actually isn't a User collection with values being referenced? Tried addind
id: number
to the User interface, but that creates a whole bunch of other type issues.If anyone has any ideas on how to make this work I think it'd be a great addition to the plugin :)