© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•4w ago
inces

JWT custom claims: Am I making the right choice?

🤷otherauth
I need developer's opinion on my authentication & security design choice. So I have chosen to use JWT custom claims for RBAC.

here's my project: a student's portal that can be signed in as (a) Parent or as (b) Student.
(a) if signed is as Parent, the Parent can sign in using any of their children's 'Student ID', then Parent will see all their children's data upon sign in.
(b) if signed is as a Student, the student must only use their own Student ID, and will only see their own data upon sign in, and cannot see their sibling's data

requirements:
- the client wants the password to be using Student IDs that are allocated to each student so that these kids dont have any issues forgetting their passwords, and admin still has control for them to prevent kids changing their passwords too frequently, keep forgetting and stuffs.
- not all students have emails, so sign in will require full name + student ID as password.
- when signed in, the student portal basically shows student's data, their classes information, announcements, and there's a payment form (no payment gateway used, just a form submission). so the sensitive. parents who sign in basically see the same thing but for multiple of their children.

so my doubt is, is this really a good choice to use JWT custom claims for authentication of sign ins instead of using supabase's default user registration/sign in authentication? when I checked, it requires each user to have an email, and I couldn't think of a way to handle accounts as said in (a) & (b) using this default email & password handling?

assume im inexperienced and need guidance from actual devs. i need feedback too. thanks!
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

Forcing JWT refresh after setting custom claims
SupabaseSSupabase / help-and-questions
4y ago
how to add data in custom claims of jwt
SupabaseSSupabase / help-and-questions
2w ago
Custom claims package
SupabaseSSupabase / help-and-questions
4y ago
Custom JWT
SupabaseSSupabase / help-and-questions
7mo ago