Skip to content
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

Supabase Auth + Prisma での運用方法 #6

Closed
motsu8 opened this issue Sep 28, 2023 · 5 comments
Closed

Supabase Auth + Prisma での運用方法 #6

motsu8 opened this issue Sep 28, 2023 · 5 comments
Assignees
Labels
documentation Improvements or additions to documentation question Further information is requested

Comments

@motsu8
Copy link
Owner

motsu8 commented Sep 28, 2023

No description provided.

@motsu8 motsu8 added the question Further information is requested label Sep 28, 2023
@motsu8 motsu8 self-assigned this Sep 28, 2023
@motsu8 motsu8 changed the title Supabase Authを使用しての連携 Supabase Authを使用して運用 Sep 29, 2023
@motsu8 motsu8 changed the title Supabase Authを使用して運用 Supabase Auth + Prisma での運用方法 Sep 29, 2023
@motsu8
Copy link
Owner Author

motsu8 commented Sep 29, 2023

現状Prismaは複数のスキーマをサポートしていない

運用方法としては、Supabase AuthでUserが追加/変更/削除されたらPublic.userにも反映させるようにするしかなさそう。
上記の実装自体はSupabaseのGUIで設定するほかなさそう。
GUIで作成後、スキーマをpullしてもキャンセルされる。(複数スキーマに対応してない)

参考URL

@motsu8 motsu8 added the documentation Improvements or additions to documentation label Sep 29, 2023
@motsu8
Copy link
Owner Author

motsu8 commented Sep 30, 2023

プレビュー機能のmultiSchemaが使えそう

multiSchemaのトピックに対して問題なければ、運用環境で使用してもよさそう
prisma/prisma#15077 (comment)

@motsu8
Copy link
Owner Author

motsu8 commented Sep 30, 2023

Supabase Auth と Prisma は相性が悪い

supabase GUI上でテーブルを作成し、開発環境へpull後、マイグレーションすると、スキーマ別にマージされず、破壊されるため、他の方法を考える。

@motsu8
Copy link
Owner Author

motsu8 commented Sep 30, 2023

Supabase Auth から Auth.js へ変更する

JWTでセッションを管理し、他エンティティはSupabase DBへ保存する

@motsu8
Copy link
Owner Author

motsu8 commented Oct 11, 2023

Auth.jsでのログインはUXが悪い→すべてSupabseで完結させる

@motsu8 motsu8 closed this as completed Oct 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant