-
Notifications
You must be signed in to change notification settings - Fork 973
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
Auth: Supabase 1.0 #1536
Auth: Supabase 1.0 #1536
Conversation
3f76779
to
c550eeb
Compare
c550eeb
to
58a757f
Compare
58a757f
to
bb6f568
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! Just a few points for clarification, but looks good.
|
||
export interface AuthClientSupabase extends AuthClient { | ||
login(options: { | ||
email: string | ||
password: string | ||
}): Promise<SupabaseAuthResponse> | ||
}): Promise<{ | ||
data: Session | null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not a Typescript expert, but could one define a SupabaseAuthResponse
and use it both here and in signup
since url
and provider
are optional? Both share data, user, and error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Technically I could. But I don't want to. I think it would confuse people. Like "I wonder when this function would ever return url
and provider
?". What I'm doing here is exactly what supabase themselves are doing as well.
@Tobbe unless you want others to review, I think is good to merge. 🎉 Next steps are:
|
https://github.com/redwoodjs/redwoodjs.com/issues/478
@thedavidprice Consider yourself notified 🙂
Added a comment to existing issue redwoodjs/playground-auth#11
|
@kiwicopple If you find your way over here, these are the import lines I was talking about redwood/packages/auth/src/authClients/supabase.ts Lines 1 to 2 in 8a28c61
Is there a cleaner way to get at those types? |
Hey @Tobbe sorry for the delay - I saw this but it was right before we did our Beta launch and I've been swamped. They types are now exported, which from the auth library and from supabase-js Should make it a lot easier to import them now |
No description provided.