3
Authentication using API keys?
Source: supabase/supabase#20475 · opened by @naveennamani
I want the following feature.
Whenever a user signup, a random API key will be generated which can then be used by the user to access the rest API of the application.
Current implementation scenario
This scheme is currently implementable using a server as follows.
• Whenever a user provides an API_KEY, the server pulls the user_id from the supabase database by logging through the service key.
• Once the API_KEY is verified and user_id is obtained, the server generates the JWT with the logged in user information by signing with the JWT token.
• The user can then use this JWT token just like the JWT token provided by supabase auth when logged in using regular methods (email, oauth etc)
Question
• Can we implement the same scheme directly using supabase auth without involving any server?
• If yes, will there be any modifications required in the RLS?
Whenever a user signup, a random API key will be generated which can then be used by the user to access the rest API of the application.
Current implementation scenario
This scheme is currently implementable using a server as follows.
• Whenever a user provides an API_KEY, the server pulls the user_id from the supabase database by logging through the service key.
• Once the API_KEY is verified and user_id is obtained, the server generates the JWT with the logged in user information by signing with the JWT token.
• The user can then use this JWT token just like the JWT token provided by supabase auth when logged in using regular methods (email, oauth etc)
Question
• Can we implement the same scheme directly using supabase auth without involving any server?
• If yes, will there be any modifications required in the RLS?
No pledges yet. Be the first to back this.
Comments
Similar requests
Support API key generation
18 votes · 0 comments
the supabase_apikeys terraform data source should return publishable and secret keys
4 votes · 0 comments
showApiKeysLastUsed feature flag is off for all users - "Last used" indicators not visible during legacy key migration
2 votes · 0 comments
Request Complete guide for Column Encryption
4 votes · 0 comments
Adding custom API keys with selectable Postgres role for backend components
1 vote · 0 comments
No comments yet.