-
Notifications
You must be signed in to change notification settings - Fork 35
Migrate to auth-go
from gotrue-go
#25
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
base: main
Are you sure you want to change the base?
Conversation
Related to supabase-community#24 Update references from `gotrue-go` to `auth-go` in the codebase. * **client.go** - Update import paths to reference `auth-go` instead of `gotrue-go`. - Update the `Client` struct to use the `auth-go` client. - Update the `NewClient` function to initialize the `auth-go` client. - Update the `SignInWithEmailPassword`, `SignInWithPhonePassword`, `EnableTokenAutoRefresh`, `RefreshToken`, and `UpdateAuthSession` methods to use `auth-go` types and methods. * **client_test.go** - Update import paths to reference `auth-go` instead of `gotrue-go`. - Update the `NewClient` function calls to initialize the `auth-go` client. - Update the test functions (`TestFrom`, `TestRpc`, `TestStorage`, and `TestFunctions`) to use `auth-go` types and methods. * **go.mod** - Remove `gotrue-go` dependency. - Add `auth-go` dependency. * **README.md** - Update the features section to mention `auth-go` instead of `gotrue-go`. * **test/remote_client.go** - Update import paths to reference `auth-go` instead of `gotrue-go`. - Update the `NewClient` function call to initialize the `auth-go` client. - Update the `SignInWithEmailPassword` method call to use `auth-go` types and methods. --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/supabase-community/supabase-go/issues/24?shareId=XXXX-XXXX-XXXX-XXXX).
- Add email/phone signup and signin tests - Implement token refresh and session management tests - Add user info retrieval and logout tests - Update to use auth-go types and requests
@akmalcm how do we like the updates to this PR? |
This pull request includes multiple changes to the Supabase Go client, primarily focusing on updating the authentication integration and improving the codebase by removing unnecessary comments and making the code more concise. The most important changes include switching from Authentication Integration Update:
Codebase Improvements:
Test Suite Enhancements:
Dependency Updates:
Miscellaneous: |
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.
looks good to me, will need repo's contributor to review too
) | ||
|
||
func TestFrom(t *testing.T) { | ||
client, err := supabase.NewClient(API_URL, API_KEY, nil) |
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.
Why prefer supa
over supabase
? The latter feels better to me.
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.
You're right. It was to quickly distinguish my old closet from a new revision.
What's blocking this change? |
It would be good to merge this PR if contributors are good with it. |
Merge this PR please 🙏 |
Please merge this PR. |
Related to #24
Update references from
gotrue-go
toauth-go
in the codebase.client.go
auth-go
instead ofgotrue-go
.Client
struct to use theauth-go
client.NewClient
function to initialize theauth-go
client.SignInWithEmailPassword
,SignInWithPhonePassword
,EnableTokenAutoRefresh
,RefreshToken
, andUpdateAuthSession
methods to useauth-go
types and methods.client_test.go
auth-go
instead ofgotrue-go
.NewClient
function calls to initialize theauth-go
client.TestFrom
,TestRpc
,TestStorage
, andTestFunctions
) to useauth-go
types and methods.go.mod
gotrue-go
dependency.auth-go
dependency.README.md
auth-go
instead ofgotrue-go
.test/remote_client.go
auth-go
instead ofgotrue-go
.NewClient
function call to initialize theauth-go
client.SignInWithEmailPassword
method call to useauth-go
types and methods.For more details, open the Copilot Workspace session.