About the compound_id of the accounts table described in the documentation #2495
Answered
by
StefanSelfTaught
ken880guchi
asked this question in
Help
-
What value should I set for the compound_id column? If anyone knows, please let me know. |
Beta Was this translation helpful? Give feedback.
Answered by
StefanSelfTaught
Aug 7, 2021
Replies: 1 comment 1 reply
-
The This is how it works with the default adapter: const compoundId = createHash("sha256")
.update(`${providerId}:${providerAccountId}`)
.digest("hex") |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
ken880guchi
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The
compound_id
is just a hash ganerated with node crypto module and it ensures that there is only one instance of an OAuth account in a way that works across different databases.This is how it works with the default adapter: