How to Store and Retrieve Session Data after Signing In?

I try to log in with Twitter, and it redirects me and works as suspected. However, I'm unsure on how to retrieve the details after signing in. But, the session is immediately gone after redirecting and not sure how to get more details.
      const { data: user, error } = await supabase.auth.admin.listUsers()
this always returns an empty list so not sure how to get the data after signing in

How does one have a twitter authentication just for verifying the twitter login they have without making it the main login on the site? I already have an authentication method using Rainbowkit to sign in with Wallet, but i just want to authenticate Twitter handle for user profile

import supabaseClient from "../utils/supabaseClient.js"

export default function Home(props) {

  const [name, setName] = useState("Verify Twitter")
  const [session, setSession] = useState(null);
  const supabase = supabaseClient()
  async function signInWithTwitter() {
    console.log(supabase)
    const { data, error } = await supabase.auth.signInWithOAuth({
      provider: 'twitter',
    })
    console.log("data", data)
    const { data: { sessionData } } = await supabase.auth.getSession();
    console.log(sessionData)
  }
  ...


in picture: not sure how to get existing data after logging in as it redirects and that data is lost
image.png
Was this page helpful?