Integrate new table schema created using plugin with authentication

Hello, I have created new table schema using plugin, and now I would like to integrate and populate that table during authentication. It might be the cas that I haven't seen required documentation on that, so link to that could also help. Basically I have this TermsOfService table plugin:
const tosPlugin = () => {
return {
id: 'tos-plugin',
schema: {
TermsOfService: {
fields: {
...
const tosPlugin = () => {
return {
id: 'tos-plugin',
schema: {
TermsOfService: {
fields: {
...
and I have inserted this plugin in config:
export const auth = betterAuth({
...
plugins: [tosPlugin(), privacyPolicyPlugin()],
});
export const auth = betterAuth({
...
plugins: [tosPlugin(), privacyPolicyPlugin()],
});
Should I create hook for populating that table? If so should I create connection myself, or is there a way to do this using better-auth. Thanks!
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?