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
fix(destory-session): testing destroy session for all devices using supabase #833
base: main
Are you sure you want to change the base?
fix(destory-session): testing destroy session for all devices using supabase #833
Conversation
… using supabase" This reverts commit f0262ea.
hey @rphlmr . IDK if you remember but we have this issue: #825 |
id String @id @default(cuid()) | ||
|
||
expires DateTime? | ||
userId String? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about User link here to prevent phantom userId?
|
||
expires DateTime? | ||
userId String? | ||
data Json |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: normalise instead of hiding in a JSONB col?
Given the schema below:
email: z.string(),
userId: z.string(),
expiresAt: z.number(),
expiresIn: z.number(),
accessToken: z.string(),
refreshToken: z.string(),
we could have a col for:
accessToken
, refreshToken
Later in the createDatabaseSessionStorage
implementation, we could use the expiresAt
from the supabase auth token to populate the expires
col of this table?
Then, you control this settings from supabase auth dashboard.
{ status: 500 } | ||
); | ||
} | ||
const updatedData = await db.session.updateMany({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't we delete all existing sessions for this userId and then create a new one + save it in the context before redirect?
No description provided.