-
-
Notifications
You must be signed in to change notification settings - Fork 345
Auth #3
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
Comments
issue to discuss the specification of methods in supabase-js to invoke auth endpoints on auth/v1 the endpoints that will be targeted are:
more details regarding the function of the endpoints found here (you'll have to scroll past the env vars to the relevant section) initial idea discussed with @kiwicopple was to allow the user to create a single client and call methods on an auth namespace like: import { createClient } from '@supabase/supabase-js'
const supabase = createClient(URL, KEY)
await supabase.auth.signup(new_email, new_password)
await supabase.auth.login(email, password) // might also return jwt so it can be managed manually
await supabase.auth.logout() signup (if not requiring email confirmation) and login will set a cookie containing the auth-token, which will then be sent in a header for any call to logout, or calls to rest or realtime methods (subscribe(), select() etc.) |
just linking this here netlify/gotrue#255 as the gotrue /token interface may change |
I think we also want to take on the work of refreshing the token depending on the jwt_expiry built into the client |
Cross-referencing supabase/postgres#27 which has a JWT dependency |
Tracks progress on supabase/supabase#111
The text was updated successfully, but these errors were encountered: