0

There is no any dedicated video or article on this.

I really need this solution.

  • 1
    This is an example using Node.js, but you can do the same in Go land as well! https://github.com/supabase/supabase/issues/491#issuecomment-1313075179 – dshukertjr Dec 07 '22 at 05:28

1 Answers1

1
import (
    "github.com/nedpals/supabase-go"
)

func verifyTokenSupabase(token string) (*supabase.User, error) {

    supabase := supabase.CreateClient(supabaseUrl,supabaseAnonKey)

    ctx := context.Background()
    ctx, _ = context.WithTimeout(ctx, 60000*time.Millisecond)

    fmt.Println(ctx)

    user, err := supabase.Auth.User(ctx, token)

    if err != nil {
        return user, err
    }

    return user, nil

}
Big_Boulard
  • 799
  • 1
  • 13
  • 28