import liff from "@line/liff";

async function initLiff(app) {
    await liff.init({ liffId: import.meta.env.VITE_APP_LINE_LIFF_ID });
    if (!liff.isLoggedIn()){
        liff.login({ redirectUri: window.location.href });
    }
    app.provide('liff', liff);
}

export default initLiff;