wolfie's dad
08/06/2022, 2:45 PMurl: str = os.environ.get("SUPABASE_URL")
key: str = os.environ.get("SUPABASE_KEY")
supabase: Client = create_client(url, key)
user = supabase.auth.api.get_user(jwt=token)
but api returns me 401 unauthorized.
The token i am using is the access_token that my mobile client is sending me after a user logs in with OTPwolfie's dad
08/06/2022, 2:46 PMVinzent
08/06/2022, 7:12 PMjaitaiwan
08/15/2022, 5:50 AMProtoFeather
09/02/2022, 12:05 PMmauro_vit
09/22/2022, 4:59 PMmauro_vit
09/22/2022, 5:01 PMmansueli
09/22/2022, 9:34 PMcapezolo
09/23/2022, 6:19 AMmauro_vit
09/23/2022, 11:46 AMdef main():
supabase: Client = create_client(SUPABASE_URL, SUPABASE_KEY)
email: str = "test@test.com"
password: str = "test"
session = supabase.auth.sign_in(email=email, password=password)
supabase.postgrest.auth(session.access_token) # <-- this line make it works
Olyno
09/23/2022, 4:12 PMmauro_vit
09/25/2022, 5:22 PMmauro_vit
09/25/2022, 5:23 PMZetiMente
09/27/2022, 6:56 PMJustinT
10/05/2022, 5:32 AMJustinT
10/05/2022, 5:41 AMdef callback1(payload):
print("Callback 1: ", payload)
if __name__ == "__main__":
URL = f"wss://{SUPABASE_ID}.supabase.co/realtime/v1/websocket?apikey={API_KEY}&vsn=1.0.0"
s = Socket(URL)
s.connect()
channel_1 = s.set_channel("realtime:*")
channel_1.join().on("INSERT", callback1)
s.listen()
all I get is this
2022-10-05 01:38:16,452:INFO - Connection was successfulbaderdean
10/10/2022, 12:04 PManand
10/10/2022, 3:06 PMwebsockets
methods was really buggy when i tried it a few months back, imo we should get rid of the sync API and only expose an async itnerface. realtime has been on the backburner lately and it's about time we worked on it 😄JustinT
10/10/2022, 11:20 PMJustinT
10/10/2022, 11:20 PMmynamejeff
10/13/2022, 3:10 PMAnukul Anand
10/13/2022, 6:54 PMmynamejeff
10/14/2022, 7:36 AMMindsetFPS
10/14/2022, 7:54 AMconst { data, error } = await supabase
.from('countries')
.select('name')
.or('id.eq.2,name.eq.Algeria')
garyaustin
10/14/2022, 2:14 PMRawa
10/17/2022, 5:28 PMRawa
10/17/2022, 5:28 PMRawa
10/17/2022, 5:28 PMAnukul Anand
10/18/2022, 7:17 PM