Persist auth across preview rerenders
This commit is contained in:
1 parent
d6b35fe346
commit
d9a996aa98
5 files changed
+163
-8
No files matched your search
@@ -27,7 +27,9 @@ public struct MusicAPI: Sendable {
|
||||
try await client.request("POST", path: "auth/session")
|
||||
}
|
||||
public func signOut() async throws -> SignOutResponse {
|
||||
try await client.request("POST", path: "auth/signout")
|
||||
let response: SignOutResponse = try await client.request("POST", path: "auth/signout")
|
||||
AuthCookiePersistence.clear()
|
||||
return response
|
||||
}
|
||||
public func currentUser() async throws -> User { try await client.request("GET", path: "user") }
|
||||
|
||||
|
||||
Reference in new issue
Block a user