Fehmi
05/01/2022, 12:52 PMjs
const { createClient } = require('@supabase/supabase-js');
const access_token = "....." // I got this from my working React front end and validated the token from jwt.io, which can decode the token
const supabaseUrl = "https://......supabase.co"
const public_anon_key = "......"
const supabase = createClient(supabaseUrl,public_anon_key)
async function validateUser() {
let {user, data, error} = await supabase.auth.api.getUser(access_token)
console.log( {user, data, error})
}
validateUser()
I get
{
user: null,
data: null,
error: { message: 'Invalid token: signature is invalid', status: 401 }
}
Needle
05/01/2022, 12:52 PM/title
command!
We have solved your problem?
Click the button below to archive it.garyaustin
05/01/2022, 2:07 PMNeedle
05/01/2022, 2:07 PM