SQL transactions? #1722
-
Doing the https://lucia-auth.com/tutorials/google-oauth/nextjs I see that we need to insert into two tables, shouldn't this be atomic? lucia/pages/tutorials/google-oauth/nextjs.md Line 168 in c8b4192 lucia/pages/tutorials/google-oauth/nextjs.md Line 171 in c8b4192 https://v3.lucia-auth.com/guides/oauth/multiple-providers Is there a reason why transactions are not used? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
The operations doesn't need to be atomic. You can still sign-in again even if it fails to create a new session. It's also much easier to read if we just use a single function call for each query. |
Beta Was this translation helpful? Give feedback.
The operations doesn't need to be atomic. You can still sign-in again even if it fails to create a new session. It's also much easier to read if we just use a single function call for each query.