Skip to content
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.VerifyForUser returns response data as error #2

Closed
cezarsmpio opened this issue Sep 17, 2024 · 2 comments
Closed

Auth.VerifyForUser returns response data as error #2

cezarsmpio opened this issue Sep 17, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@cezarsmpio
Copy link

cezarsmpio commented Sep 17, 2024

Bug report

Describe the bug

When calling Auth.VerifyForUser I expect the first parameter, which is the response, to be filled, instead, it's nil.

Example:

	res, err := s.supabaseService.Client().Auth.VerifyForUser(types.VerifyForUserRequest{
		Type:       types.VerificationType("email"),
		Token:      authSignUpConfirmDto.Code,
		Email:      authSignUpConfirmDto.Email,
		RedirectTo: siteUrl,
	})

	fmt.Println("res", res)
	fmt.Println("err", err)

If this succeeds, res is nil, and err contains the response with access token and other data.

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. Call Auth.VerifyForUser with correct data
  2. First parameter, which is type of types.VerifyForUserRequest is nil, which it shouldn't if the response succeeds

Expected behavior

I expect that types.VerifyForUserRequest is not nil, and contains access token.

I assume, if this is indeed a bug, the error might be between these lines: https://github.com/supabase-community/auth-go/blob/main/endpoints/verify.go#L142-L148

Maybe Supabase API doesn't return 303 anymore?

Screenshots

res is nil

image

System information

  • OS: macOS
  • gotrue-go: 1.2.0
  • supabase-go: 0.0.4
@kwoodhouse93
Copy link
Collaborator

Should be addressed by #8

@cezarsmpio
Copy link
Author

Thanks 😊 you guys rock!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants