ricky
06/25/2022, 10:38 PMgaryaustin
06/25/2022, 11:04 PMstijn
06/26/2022, 4:21 PMpersistSession: true
, it stores the session in localStorage which isn't great security wise. While I'm not sure it's 100% safe I thought it would be better to instead store the refresh-token in a cookie and use this to persist the session?
Is it possible to authenticate with a refresh token?
Does anybody know other/better ways to securely persist session?
All advice and related resources are appreciated:)aa
06/27/2022, 2:22 AMmattdeere
06/27/2022, 8:00 AMImmigrant
06/27/2022, 9:22 AMsilentworks
06/27/2022, 10:43 AMpaddyjoneill
06/27/2022, 11:16 AMImmigrant
06/27/2022, 11:19 AMLEGEND
06/27/2022, 11:21 AMLEGEND
06/27/2022, 11:24 AMsilentworks
06/27/2022, 11:25 AMsilentworks
06/27/2022, 11:25 AMImmigrant
06/27/2022, 11:27 AMsilentworks
06/27/2022, 11:30 AMImmigrant
06/27/2022, 11:34 AMBangBangSaxena
06/27/2022, 2:06 PMyolo
06/27/2022, 8:48 PMBangBangSaxena
06/28/2022, 6:15 AMRevxrsal
06/28/2022, 9:44 AMsilentworks
06/28/2022, 9:47 AMsatya
06/29/2022, 12:22 PMzenny.eth
06/29/2022, 6:08 PMggggguh
06/29/2022, 7:31 PMsnowshift
06/29/2022, 7:45 PMjaitaiwan
06/29/2022, 11:37 PMSven Magnus
06/30/2022, 1:58 AMjaitaiwan
06/30/2022, 2:27 AMedelacruz
06/30/2022, 7:51 AM<script>
import { supabase } from '$lib/supabaseClient'
import { goto } from '$app/navigation'
import { user } from '$lib/stores/sessionStore.js'
let loading = false
let email = ''
let password = ''
const handleLogin = async () => {
try {
loading = true
const { error } = await supabase.auth.signIn({ email, password })
if (error) throw error
const tmpUser = supabase.auth.user()
user.set({
email: tmpUser.email,
id: tmpUser.id,
})
goto('/')
} catch (error) {
alert(error.error_description || error.message)
} finally {
loading = false
}
}
</script>