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

Insert Person following Auth #71

Closed
nelsonic opened this issue Oct 4, 2020 · 1 comment
Closed

Insert Person following Auth #71

nelsonic opened this issue Oct 4, 2020 · 1 comment
Assignees
Labels
discuss Share your constructive thoughts on how to make progress with this issue enhancement New feature or enhancement of existing functionality help wanted If you can help make progress with this issue, please comment! in-progress An issue or pull request that is being worked on by the assigned person priority-2 Second highest priority, should be worked on as soon as the Priority-1 issues are finished T2h Time Estimate 2 Hours technical A technical issue that requires understanding of the code, infrastructure or dependencies

Comments

@nelsonic
Copy link
Member

nelsonic commented Oct 4, 2020

As part of the migration to auth_plug #65 we also need to insert the person into the database when the person has successfully authenticated. That means we need to either pass the App.Person.upsert_person function to auth_plug directly, or we need to inset the person as part of creating the first item ... 🤷

At the moment I'm leaning towards having a function that checks for a JWT in the URL query params
and upserts the person based on the JWT-verified data. 💭

Need to think about this a bit more. 🤔

image

 Ecto.ConstraintError at POST /items
constraint error when attempting to insert struct:

    * items_person_id_fkey (foreign_key_constraint)
@nelsonic nelsonic added enhancement New feature or enhancement of existing functionality help wanted If you can help make progress with this issue, please comment! technical A technical issue that requires understanding of the code, infrastructure or dependencies discuss Share your constructive thoughts on how to make progress with this issue labels Oct 4, 2020
@nelsonic nelsonic self-assigned this Oct 4, 2020
@nelsonic nelsonic added in-progress An issue or pull request that is being worked on by the assigned person priority-2 Second highest priority, should be worked on as soon as the Priority-1 issues are finished T2h Time Estimate 2 Hours labels Oct 4, 2020
@nelsonic
Copy link
Member Author

nelsonic commented Oct 5, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discuss Share your constructive thoughts on how to make progress with this issue enhancement New feature or enhancement of existing functionality help wanted If you can help make progress with this issue, please comment! in-progress An issue or pull request that is being worked on by the assigned person priority-2 Second highest priority, should be worked on as soon as the Priority-1 issues are finished T2h Time Estimate 2 Hours technical A technical issue that requires understanding of the code, infrastructure or dependencies
Projects
None yet
Development

No branches or pull requests

1 participant