Skip to content
This repository has been archived by the owner on Jul 17, 2022. It is now read-only.

feat(fauna): use new Adapter API #182

Merged
merged 14 commits into from
Aug 16, 2021
Merged

feat(fauna): use new Adapter API #182

merged 14 commits into from
Aug 16, 2021

Conversation

balazsorban44
Copy link
Member

@balazsorban44 balazsorban44 commented Aug 16, 2021

See #171, nextauthjs/next-auth#2361

TODO: Figure out how to cascade deletion of accounts and sessions:

In the future, we would like to implement a "delete user" feature in NextAuth. We want to use the deleteUser adapter method for that. In addition to removing the actual User, we should remove any remaining user objects like the connected accounts and active sessions. I need help to figure out how to do that.

cc @pbteja1998 Could you provide some guidance?

Docs says:
> There is no cascading delete for user-defined documents. If you have a document "A" that includes a reference to another document "B", deleting "A" does not affect "B", and deleting "B" does not affect "A". You would have to write your own query logic to automatically follow references to perform a cascading delete.

https://docs.fauna.com/fauna/current/api/fql/functions/delete?lang=javascript

@github-actions github-actions bot added fauna @next-auth/fauna-adapter related tests Changes to testing labels Aug 16, 2021
@balazsorban44 balazsorban44 marked this pull request as ready for review August 16, 2021 16:31
Copy link
Member

@ndom91 ndom91 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM as well, man is fauna less inuitive though than prisma imo 😅 the prisma methods and object arguments "just make sense", where fauna seems super cryptic at times

Tests all passed, etc 🎉 I had some trouble initially though - had to delete my node_modules and package-lock.json a few times and remember to use node 16+ (randomUUID) and then finally with node 16 and switching to yarn I was able to get it to run and all pass!!

@balazsorban44 balazsorban44 merged commit d272b41 into next Aug 16, 2021
@balazsorban44 balazsorban44 deleted the feat/refactor-faunadb branch August 16, 2021 20:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
fauna @next-auth/fauna-adapter related tests Changes to testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants