export const AuthClient = createAuthClient({
fetchOptions: {
onSuccess: (ctx) => {
const token = ctx.response.headers.get("set-auth-token");
if (token) {
console.log(token);
window.postMessage({ action: "READLATER_AUTH", token });
}
},
},
plugins: [polarClient(), lastLoginMethodClient()],
});
export const AuthClient = createAuthClient({
fetchOptions: {
onSuccess: (ctx) => {
const token = ctx.response.headers.get("set-auth-token");
if (token) {
console.log(token);
window.postMessage({ action: "READLATER_AUTH", token });
}
},
},
plugins: [polarClient(), lastLoginMethodClient()],
});