-
Notifications
You must be signed in to change notification settings - Fork 14
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
Feature for updating user info on signin #22
Comments
Looks like the type expects -interface User {}
+interface User { id: string | number } payload-plugin-oauth/src/index.ts Line 25 in e0a6b6e
|
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 :)
The text was updated successfully, but these errors were encountered: