【问题标题】:How to connect supabase with my golang for jwt token verification API from supabase?How to connect supabase with my golang for jwt token verification API from supabase?
【发布时间】:2022-12-26 23:24:47
【问题描述】:

There is no any dedicated video or article on this.

I really need this solution.

【问题讨论】:

标签: go jwt supabase supabase-database golang-migrate


【解决方案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

}

【讨论】:

    猜你喜欢
    • 2022-12-19
    • 2022-12-28
    • 2022-12-02
    • 2022-12-19
    • 2022-12-19
    • 2022-12-28
    • 2015-10-26
    • 2022-11-20
    • 2022-12-02
    相关资源
    最近更新 更多